What is tests file ?
.tests file the is the main file where you write your test scripts into the Tesbo. Tests file considered as the collection of the Test, you can create as many .tests file inside tests folder.
Following is the folder structure for create tests file.
│ ├── tests # Contains all the tests
│ ├── runner
│ ├── locator
│ │ └───
│ └── tests
│ └─── moduleName.tests # All the test define here,
└── config.json # Main configuration file for the Running Tesbo
For Example :
For Login/Registration module, you can create .tests files as login.tests and registration.tests and can write Tesbo command in there.
Creating .tests file in project.
- Right-click on the test package and New > Directory
- Enter the name of the directory as tests
- Right-click on the tests and go to New > File
- Enter the final name as <file_name>.tests
- Define Test
To define the test script in you .tests file you'll need to pass Test: command and need to write your Test name with it.
Test: <Test Name>
Test: Verify Login functionality with valid credentials.
Step: Any Test Step
After defining the tests in your .tests file, you'll also need to define the Test steps for the particular tests too. The Tests Steps are defined with Step: command in Tesbo.
Step: <Test Step>
Step: Enter 'firstname.lastname@example.org' in @userName
Define Tag to run the Test
Tesbo also supporting the Tags in .tests file, Tags are useful when you want to run the selected bunch of test scenarios only. For example if you need to run the Regression Tests from the tests file, you can pass #regression tag for all the Regression Test script and when you'll assign Tag to your config.json file, it'll run only test with #regression tag from the tests file.
Test: Verify Login With the valid credential
#login #regression // <--Tag
Step: Pause for 5 sec
Step: Enter 'email@example.com' @userName
Step: Enter 'testbo' @password
Step: Enter 'QA' @department
Step: Click on @login Button
In config.json :