Fleakiness in call Test Case run

I create 2 test cases for web application testing,

Test Case Name Test Result Remark
TC#1: Log in passed -
TC#2: Verify UI failed - add Log in in TC#2, call Log in
- run TC#2, passed and failed
- failed in Log in part

image above: when I run TC#1, it passed with no issue.

image above: when I run TC#2, it passed and failed

my question is "no change in TC#1, but my testing was failed; why running TC#2 again "?
Do i need to setup something in order to avoid this fleakiness, please advise. thank you

UPDATE: After posting this thread, TC#2 still shown failed again and again.

1 Like

I ran TC#2 again and again, it failed.

image

Only 1 passed, the 3-rest failed.

your login TC fail if its runs along with another TC?

@jirayu.s

Your test case script does call WebUI.openBrowser('') to open a browser window. But your test case does NOT call WebUI.closeBrowser(). Your script does not explicitly close browser window. This is a bad practice.

Are you aware how many browser windows are opened? 2 or more windows? or only 1 window? Possibly you are not aware; probably you don’t care. That’s your fault. It is likely you got errors in trying to open a browser window for the 2nd time and more before closing one.

You should always explicitly close the browser window once your test is done.

1 Like