Sections

Sections are independent parts of the test flow. They help in managing complex tests more efficiently.

When creating a test with the sente new command, it will ask whether you want to include a section. To generate a new test without sections, see "Test Generate"

Generate Test With Section

use sente new command

sente new

In the "Select Test Type" section, there are two options: "web-gui" and "backend". The only difference between the two is that when you choose web-gui, a driver object is generated and a browser is automatically launched.

An example section architecture is as follows.

tests/sample4.js
/* TEST FLOW
*************/

section['First Section Name'] = async () => {


    /*
        
        Write your test codes here.


    */


}


section['Second Section Name' ] = async () => {


    /*
        
        Write your test codes here.


    */


}

You can duplicate sections by copy/pasting. Each "section" must have a unique "section name" and it is mandatory.

section['<section_name>']

Sections execute in the order they are defined. In the above example, "First Section Name" will run first, followed by "Second Section Name".

Last updated