Currently, this feature is only available in the TestFirst Desktop App. |
Here you can find basic templates that you can use to create export templates as described in Create an Export Template. You can modify these templates to fit your needs.
CSV
Pick file extension "csv" in the Create New Template window and insert this code.
You might need to replace commas with semicolons depending on your OS regional settings. |
Title:,{{ test_case.title }}
Business goal:,{{ test_case.title }}
ID:,{{ test_case.key }}
Created On:,{{ test_case.created_on }}
Created By:,{{ test_case.created_by.first_name }} {{ test_case.created_by.last_name }}
Reference:,{{ test_case.reference }}
Status:,{{ test_case.status }}
{% for step in test_case.steps %}
{{ step.number }},{{ step.action.flat | replace: '\n', " " | strip }},{{ step.expected_result.flat | replace: '\n', " " | strip }}
{% endfor %}
Cucumber
Pick file extension "feature" in the Create New Template window and insert this code.
Feature: {{ test_case.title }}
{% assign precondition_lines = test_case.precondition.flat | newline_to_br | strip_newlines | split: "<br />" -%}
{% for line in precondition_lines -%}
{{ line }}
{% endfor -%}
{% for step in test_case.steps -%}
Scenario: Step #{{ step.number }}
{% assign action_lines = step.action.flat | newline_to_br | strip_newlines | split: "<br />" -%}
{% for action_line in action_lines -%}
{{ action_line }}
{% endfor -%}
{% assign er_lines = step.expected_result.flat | newline_to_br | strip_newlines | split: "<br />" -%}
{% for er_line in er_lines -%}
{{ er_line }}
{% endfor %}
{% endfor -%}
Comments
0 comments
Please sign in to leave a comment.