Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

With AltWalker, automation code related to our model can be implemented in Python, C#, or other. In this approach, GraphWalker is only responsible for generating the path through the modelsçmodels.



Starting by clarifing some key concepts, using the information provided by GraphWalker's documentation that explains them clearly:

...

Info
titlePlease note

As detailed in AltWalker's documentation, if we start from scratch (i.e. without a model), we can initialize a project for our automation code using something like:


  $ altwalker init -l python test-project


When we have the model, we can generate the test package containing a skeleton for the underlying test code.


  $ altwalker generate -l python path/for/test-project/ -m path/to/models.json


If we do have a model, then we can pass it to the initialization command:


  $ altwalker init -l python test-project -m path/to/model-name.json



During implementation, we can check our model for issues/inconsistencies, just from a modeling perspective:


  $ altwalker check -m path/to/model-name.json "random(vertex_coverage(100))"


We can also check verify if the test package contains the implementation of the code related to the vertices and edges.


  $ altwalker verify -m path/to/model-name.json tests


Check the full syntax of AltWalker's CLI (i.e. "altwalker") for additional details.

The  Java class that implements the edges and vertices of this model is defined in the class NewOwnerTest.


The main test package is stored in tests/test.py. The implementation follows the Page Objects Model using pypom package and each page is stored in a proper class under a specific pages directory.

...

Code Block
languagebash
titleexample of a Bash script to import the results
#!/bin/bash

# if you wish to map the whole run to single Test in Xray/Jira
REPORT#REPORT_FILE=output_allinone.xml

# if you wish to map each model as a separate Test in Xray/Jira
#REPORTREPORT_FILE=output.xml

curl -H "Content-Type: multipart/form-data" -u admin:admin -F "file=@$REPORT_FILE" http://192jiraserver.168example.56.102com/rest/raven/1.0/import/execution/junit?projectKey=CALC

...

  • Use MBT not to replace existing test scripts but in cases where yoou need to provide greater coverage
  • Discuss the model(s) with the team and the ones that can be most useful for your use case
  • Multiple runs of your tests can be grouped and consolidate in a Test Plan, so you can have an updated overview of their current state
  • After importing the results, you can link the corresponding Test issues with an existing requirement or user story and thus truck coverage directly on the respective issue, or even on an Agile board
    • Image Removed Image Added  Image Added
    •   Image RemovedImage Added  Image Removed
    • Image Added

References

...