bst icon indicating copy to clipboard operation
bst copied to clipboard

dependsOnTags functionality

Open MKen-li opened this issue 7 years ago • 0 comments

Summary

This feature will add the ability to organize the running order of the tests. It will also make the tests skip if one or more if the father test fails.

Example


  • test: Launch request.
  • tags: Test A
  • open guess the price: "*"

  • test: Launch request, play 2 times with one player and stop.
  • dependsOnTags: Test A
  • open guess the price: how many persons are playing today
  • one: please tell us your name
  • kevin: let's start the game kevin your product is * guess the price
  • 240: you said 240 the actual price was * your score for that answer is * points your next product is * guess the price
  • 300: you said 300 the actual price was * your score for that answer is * points your next product is * guess the price
  • stop: goodbye

In this scenario regardless of the order, the system will look first to the dependsOnTags property and run all of the tests that have that tag first.

Adding the dependsOnTags to each test could be hard to maintain for that we should offer the possibility to create the dependencies in the testing.json file where we can specify which tags depend on other tags.

"dependsOnTags" : { "Test A" : ["Test B, Test C"] }

Like this all the test that have the tags "Test A" will be executed after all of the tests that have the tags "Test B" and "Test C"

Acceptance Criteria

  1. GIVEN: The user runs a test WHEN: The user adds a dependency correctly and one or more of the father test fail THEN: The system Skip of all the child test

  2. GIVEN: The user runs a test WHEN: The user adds a dependency correctly and all of the father tests pass THEN: The system runs all of the child tests

  3. GIVEN: The user runs a test WHEN: The user adds a dependency but the name of the tag doesn't exist THEN: The system shows the error "Error description"

  4. GIVEN: The user runs a test WHEN: The user makes a mistake and creates a loop between dependencies THEN: The system shows the error "Error description"

Additional context

dependsOnTag functionality will not work across YAML files.

MKen-li avatar Jan 22 '19 15:01 MKen-li