I have 3 api test cases that run successfully when run independently but when fixed in a test suite, only the very first test case passes and the other two fail. When I re-arrange the test suite, whichever test case I fix at the top passes and the other two fail, always with the same error (cannot get property on null object). Now, if the test case at the top fails for any other reason (expected value not matching actual value for instance), the second test passes and the last one fails with the error mentioned before. When I de-select the first test case in the test suite, second one passes and the last one fails. I’ve updated my web drivers but still can’t seem to get past it
Note: none of the tests are dependent on each other or manipulating test data another test case in the suite would use
I’m suspecting the web driver may still be causing it even though I updated them. It has happened occasionally in the past and re-arranging the test cases till I got a successful pass did the trick but it’s not working here. Any help would be greatly appreciated
Please have look at the following guideline
We need to see more detail
- your test case code
- error log
- target web pages’ HTML