Forum Discussion
So you have 109 tests.
When run in isolation, each test is fine.
When run in sequence, one after the other, it fails.
Pretty simple then. One of your tests is leaving things in a state that the next one can't work with. You mention multiple pages being open? Is it meant to be like that? If a test expects to start with no browsers open, and your previous test has left a bunch open, then you're going to have problems.
Automated tests generally require a solid baseline/start point. If you're not providing that, expect problems.
Thank you for your response
But in all my test I have only -The RUN Browser- activated in the first Test (Test 1)and -Close Browser- at the end (test 109)
according to my logic, I think its problem of name mapping is't it?
Please do you have other solution
Thank you
- tristaanogre9 years agoEsteemed Contributor
Actually, no... I don't think it's name mapping as such. I think what is happening is that you are getting a reference to an object, then you are doing something else, then you are going back to that object and, in that intervening interval, that object you had reference to was destroyed and recreated. The original handle to the object is invalid.
Hence the question of examining what's going on in Test 108... specifically, what line of code is getting the error and what is it expecting at that point in time. And, likewise, you need to double check that, whever is going on there, it's not going to be sensitive to what happened in Test 107.
One POSSIBLE scenario to investigate... and this is just a guess but it is an example of what COULD happen.
Test 107 grabs a reference to an object and throws it into something like a global variable or a project variable or something. Test 108 uses that same variable in it's code to reference the same object and, perhaps, if that reference isn't there, it refreshes it somehow (reassigns the variable, performs some other steps, etc).
However, Test 107 ends up doing something that actually destroys the object so that the reference is still there (variable is not NULL) but the underlying object is no longer valid. Test 108 sees the reference is not NULL and tries to use it only to find that the object was destroyed in the intermediate time.
Again..., this is a POSSIBLE scenario and, since we don't actually have your test cases here, should only be treated as a guess. The exercise of determining what EXACTLY is happening is left up to you to do the necessary leg work.- Colin_McCrae9 years agoCommunity Hero
I'm pretty much in agreement with tristaanogre in broad terms.
You mention: "But in all my test I have only -The RUN Browser- activated in the first Test (Test 1)and -Close Browser- at the end (test 109)"
So does this mean you start the browser in test 1 ..... do all sorts of things/tests with it in test 2 - test 108 .... and then close it again in test 109? And test 108 is now throwing an error? (When you run them all, but it's OK on it's own.)
Which means you have 106 possible candidates. Namely, tests 2 - 107. One of them is doing something which means test 108 can't run. Being the test before it, I guess 107 is the prime candidate. But it could be any of them to be honest. You need to look into the object that's throwing up the problems and see if you can work out which of your previous tests is affecting it.
- AssiaDerias9 years agoOccasional Contributor
Hi;
Finally i have found solution of my bug;
It's matter of web page, i activate the navigate browser of the test number 108 and all work fine
But i noticed that as the execution progress to the end the tests become more slow, and i don't know Why!!
Thank you very match for your help and attempt to resolve my problem
PS: i would pass a certification Exam of test complete for beginner/or intermediate, what dou you advice me?
Thank you in advance