How to write test setup and tear down in CITS

56 views
Skip to first unread message

Sameer Boxi

unread,
Mar 12, 2020, 4:57:34 AM3/12/20
to Cognizant Intelligent Test Scripter
I wanted to keep Test Setup (Launch browser, login etc) before start the execution and test tear down(Logout, close browser) after selected test finished execution.

How and where to write the options? 

Thanks

shantha laxmi kumar

unread,
Mar 12, 2020, 5:21:54 AM3/12/20
to Cognizant Intelligent Test Scripter
CITS lets you to create reusable components and hence you can modularize the steps in to the step up and tear down model and orchestrate the flow accordingly. To convert steps to reusable, select steps> create reusable and give the name for the reusable component.

Sameer Boxi

unread,
Mar 13, 2020, 8:39:13 AM3/13/20
to Cognizant Intelligent Test Scripter
let me rephrase my question:

I have 30 test cases in a suite. Each test cases does below actions

1. opens up the browser. 
2. login to the application, 
3. do the functional testing steps for each test
4. logout from the application 
5. closes the browser

step 1, 2, 4 and 5 is repeating for all 30 test cases.

instead I want execute all 30 tests as below.

1. Test Setup (Open the browser and login to the application)
2. Execute test 1, test 2, test 3 ......test 30 (which just handles the functional steps related to the respective tests)
3. Test Tear down (logout from the application, closes the browser)

As i created reusable components i can do in a single tests as soon as one test is completes it logout from the application and closes the browser. But i want to keep the the application ready for other test to continue with out logout and closing the browser.

Thanks for your help in advance

shantha laxmi kumar

unread,
Mar 13, 2020, 8:49:22 AM3/13/20
to Cognizant Intelligent Test Scripter
In order to keep the browser and session alive to continue the execution of other test cases, please use the option "use existing session" from the execution panel.Check "use existing browser" under "Run settings" of the test set and execute your test cases in a single browser session.

Sameer Boxi

unread,
Mar 16, 2020, 12:45:47 AM3/16/20
to Cognizant Intelligent Test Scripter
Thanks for the info. I have used already "use existing session"  feature to keep browser active. But it doesn't solve the problem with auto logout on each test cases execution even though my tests doesn't have logout step. Each time I have to login back to test the 2nd test, 3rd tests.....

shantha laxmi kumar

unread,
Mar 16, 2020, 7:40:34 AM3/16/20
to Cognizant Intelligent Test Scripter
Please share relevant console logs and screenshots to understand the issue.
Reply all
Reply to author
Forward
0 new messages