1.

What are the different test case styles in the context of the robot framework?

Answer»

There are various alternative APPROACHES to writing test cases. Test cases describing a workflow can be built using either a keyword-driven or a behaviour-driven approach. Using a data-driven approach, you may evaluate the same workflow with different input data.

  • Keyword-driven style: Workflow tests, like the Valid Login test, are made up of a number of keywords and their possible arguments. In the Valid Login EXAMPLE, the system is first put into the initial state (Open Login Page), then something is done to it (Input Name, Input Password, Submit Credentials), and lastly the system is confirmed to have performed as intended (Welcome Page Should Be Open).
  • Data-driven design: Another TECHNIQUE to writing test cases is the data-driven approach, which hides the real test workflow by using only one higher-level keyword, commonly created as a user keyword. When you need to test the same scenario with varied input and/or output data, these tests come in HANDY. Although it would be possible to utilise the same keyword in each test, the test template functionality allows you to define the keyword just once.
  • Behaviour-driven design: Test cases can also be written as requirements that non-technical project stakeholders must comprehend. The cornerstone of a technique known as Acceptance Test-Driven Development (ATDD) or Specification by Example is a set of executable criteria.
    The Given-When-Then approach, popularized by Behavior Driven Development, is one technique to construct these requirements/tests (BDD). The initial state is commonly SPECIFIED with a keyword beginning with the word Given, the actions with a keyword beginning with When, and the expectations with a keyword beginning with Then when constructing test cases in this style. If a phase has multiple actions, a keyword beginning with And or But can be used.


Discussion

No Comment Found