SPONSORS:






User Tag List

Results 1 to 10 of 10
  1. #1
    Member
    Join Date
    Oct 2001
    Location
    Cupertino, CA, USA
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Distributed Testing

    Good clarification point. There are three machines total. One is the host and that host controls two machines with the agent

    ------------------

  2. #2
    Member
    Join Date
    Oct 2001
    Location
    Cupertino, CA, USA
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Distributed Testing

    Hi

    I have an environment that has two machines. I wrote a distributed automation script that runs a testcase on both machines at the same time. The problem that I am having is that if the first machine crashes, the script stops running on the second machine even if the second machine hasn't crashed. Since both machines are on separate threads, why does the second machine stop running?

    ------------------

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    186
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Distributed Testing

    Is one of the machines the host, or are they both just agents?

    ------------------
    Tom
    Tom

  4. #4
    Member
    Join Date
    Aug 2001
    Location
    Ireland
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Distributed Testing

    Hi there,

    Do you use the rendezvous statement in the test ? This could be the problem.

    Cheers,
    Conor

    ------------------

  5. #5
    Member
    Join Date
    Oct 2001
    Location
    Cupertino, CA, USA
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Distributed Testing

    Perhaps a code snippet will clarify what I am trying to do:

    void DistributedSetup (list of string strMachines)
    {
    string strMachine = '';

    for each strMachine in strMachines
    {
    print ("Connecting to machine " + strMachine);
    SetupMachine (strMachine);
    }

    SetMultiAppStates();
    }

    void SwitchMachine (string strMachineName)
    {
    SetMachine (strMachineName);
    }

    {
    DistributedSetup (gMachineNames);
    SpawnAndRendezvous();
    }

    void SpawnAndRendezvous()
    {
    string strTempMachine = '';

    for each strTempMachine in gMachineNames
    {
    spawn
    {
    gstrCurrentMachine = strTempMachine;
    SwitchMachine (strTempMachine);
    MyTestCase();
    }
    }

    rendezvous;
    }

    I want the second machine to not stop running the script if the first one stops due to an error (in this case, the app being tested crashed). The second machine should stop only if it also encounters an error

    ------------------

  6. #6
    Member
    Join Date
    Aug 2001
    Location
    Ireland
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Distributed Testing

    The following is from the SilkTest help:

    A rendezvous statement blocks execution of the calling thread until all threads that were spawned by the calling thread have completed. When the last child thread exits, it unblocks the parent thread. If the calling thread has no child threads, rendezvous does nothing.

    I think this is your problem.

    Cheers,
    Conor


    ------------------

  7. #7
    Member
    Join Date
    Oct 2001
    Location
    Cupertino, CA, USA
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Distributed Testing

    I am calling rendezvous after the for loop. This would prevent the parent script from continuing until all the threads finish. The problem is that one of the threads finished early because the app crashed. The second thread shouldn't care about it and keep on going.

    ------------------

  8. #8
    Senior Member
    Join Date
    Dec 1999
    Location
    Sarasota FL USA
    Posts
    109
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Distributed Testing

    We added the do ... except logic around the main function that executes the tests. This will trap the error on system 1 and allow (most of the time) system 2 to continue.

    What version of SilkTest? Have you tried more then 2 targets? With 5.5, and 4 target systems, partner.exe will crash after running for a while with a cannot read memory error.

    ------------------

  9. #9
    Member
    Join Date
    Oct 2001
    Location
    Cupertino, CA, USA
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Distributed Testing

    Thanks tlvranas. I'll give that a try and see what happens. To answer your questions, I am using Silk 5.5 SP1, and only two target systems

    ------------------

  10. #10
    Member
    Join Date
    Oct 2001
    Location
    Cupertino, CA, USA
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Distributed Testing

    Well, that fixes the problem. Unfortunately, in the results file, I am expecting to see two results in the results file. One stating that the testcase failed and another one stating that it succeeded. What I get is a result within a result. Something like:

    MyTestCase ("Yamamoto-spg") -- 1 error
    MyTestCase ("Akagi-spg") -- 1 error
    exception 1
    Occurred in MyTestCase line x

    Shouldn't I see

    MyTestCase ("Yamamoto-spg") -- 1 error
    MyTestCase ("Akagi-spg") -- Passed


    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:43 AM.

Copyright BetaSoft Inc.