Self-learning is a mechanism that yascribe utilizes to automate scenarios in templates. That makes scenarios reusable by other scenarios.
For example :
Feature: Finding fastest routes
Scenario: Finding routes to "Paris"
When I enter "Paris" into "Destination"
And I click on "Go"
Scenario: Finding the fastest route to "London"
When I find routes to "London"
And I select "Fastest route" in "Found routes"
In this example, the first step of the second scenario is a call to the first scenario in order to find routes to “London” (instead of “Paris”) :
When I find routes to "London"
This second scenario is equivalent to :
Scenario: Finding the fastest route to "London"
When I enter "London" into "Destination"
And I click on "Go"
And I select "Fastest route" in "Found routes"
Do not run a templated scenario
When executing the previous test plan, the two scenarios are run. To not run the first scenario (Finding routes to “Paris”) but only calls of its template in other scenarios, just tag the scenario with the keyword 'no run'
:
Feature: Finding fastest routes
Scenario: no run : Finding routes to "Paris"
When I enter "Paris" into "Destination"
And I click on "Go"
Scenario: Finding the fastest route to "London"
When I find routes to "London"
And I select "Fastest route" in "Found routes"
Making libraries of scenarios
To create a library of scenarios, create Features
that contain the scenarios. Then push the Feature
files to the library folder on the server.
To use the library in test plans, just set the library in the settings of the test project.