Interview Questions

How can I schedule the different testcases in a (.t) test script so that all the test cases it contains run one after another ? ...

Software QA/Testing Technical FAQs


(Continued from previous question...)

How can I schedule the different testcases in a (.t) test script so that all the test cases it contains run one after another ? ...

A small query: a numbe of (.t) script files which contains a number of test cases. Need to call a user defined method in all the (.t) script files.
Problem: How to do that.
Second is: if this is possible that when one test case is run successfully, can I put in the condition that if it is successfull, go to testcase 2 else go to test case 3.
Third is: How can I schedule the different testcases in a (.t) test script so that all the test cases it contains run one after another.


Answer for Problem: How to do that:
X Just take instance for your class and call the method thru that instance.
Answer for 2nd and 3rd queries:
.t file
=======
[-] testcase tc1() appstate none
[ ] Print("This is tc1")

[-] testcase tc2() appstate none
[ ] Print("This is tc2")

[-] testcase tc3() appstate none
[ ] Print("This is tc3")

call your test cases under main function as below.

[-] main()
[ ]
[-] tc1()
[-] if GetTestsPassedCount ( )!=0 // Executing testcases tc2 and tc3 when testcase tc1 is passed only.
[ ] tc2()
[ ] tc3()

(Continued on next question...)

Other Interview Questions