T E S B O

Tesbo

Reuse the repetitive steps by using Collection.

The collection is a set of steps that you can use in the multiple tests within the same tests file by giving Collection name. There are two ways to declare the Collection in Tesbo. 

Create the Collection individually. #

   ==>    Collection Name: login in phptravels
Step: Pause until @Email_Box is display
Step: pause 1 sec
Step: Enter 'admin@phptravels.com' in to @Email_Box
Step: Enter 'demoadmin' in @Password_Box
Step: Click on @LoginBtn
End

Mark any test as a Collection #

           Test: verify custom step functionality
#All #collection
==> Collection: login in phptravels
Step: Pause until @LogoutBtn is display
Step: pause 1 sec
Step: Scroll to Bottom
Step: pause 1 sec
Code: Click on account button
Step: Pause 2 sec
Code: Verify profile page title
Verify: @LogoutBtn is Displayed
Step: Pause 2 sec
End

 You can find a similar example from Tesbo-Skeleton as well 

How to implement and use Collection in tests  #

To use the previously defined collection in your current test, you just need to pass that collection name only as below. 

           Test: Verify user is able to login successfully
 ==> Collection: 'amazon_open'
           Step: Enter 'qa.tesbo@gmail.com' in @Email text box 
           Step: Enter 'password' in @Password text box
           Step: Click on @Login Button   
      End

     The above test will first run the amazon_open collection and after starting the first step of entering the email id.    You can also define this collection anywhere in your test.   

           Test: Verify user is able to login successfully
Step: Enter 'qa.tesbo@gmail.com' in @Email text box 
           Step: Enter 'password' in @Password text box
           Step: Click on @Login Button   
       ==> Collection: 'amazon_close'
End

Powered by BetterDocs

Leave a Comment