Convert user stories from CSV files into individual TestDriver test files using Node.js and GitHub Actions.
This guide demonstrates how to convert user stories from CSV files into individual TestDriver test files using Node.js. Each user story will be saved as its own YAML test file, and the tests will be executed in parallel using a GitHub Actions workflow.
Export user stories from your source (TestRail, CSV, or Jira) and save them in a structured format (for example, JSON or CSV). For example:
user_stories.csv
):User Story ID | User Story Title | Description |
---|---|---|
1 | Log in to the application | User logs in with valid credentials. |
2 | Search for a product | User searches for a product by name. |
3 | Add product to cart | User adds a product to the cart. |
Create a Node.js script to read the exported data and generate individual YAML test files for each user story.
generate-tests.js
)This script will generate individual YAML test files (for example, test_1.yaml
, test_2.yaml
) in the testdriver/
directory.
Create a GitHub Actions workflow to execute the generated test files in parallel.
.github/workflows/run-tests.yaml
)Store your TestDriver API key as a GitHub secret (for example, TD_API_KEY
) to securely authenticate your tests.
generate-tests.js
script, user_stories.csv
, and .github/workflows/run-tests.yaml
to your repository.main
branch.The GitHub Actions workflow will automatically:
testdriver/
directory.Generated Test Files:
testdriver/test_1.yaml
testdriver/test_2.yaml
testdriver/test_3.yaml
GitHub Actions Dashboard:
This setup automates the process of converting user stories into individual test files and running them in parallel using GitHub Actions. It ensures comprehensive test coverage while optimizing execution time.
Convert user stories from CSV files into individual TestDriver test files using Node.js and GitHub Actions.
This guide demonstrates how to convert user stories from CSV files into individual TestDriver test files using Node.js. Each user story will be saved as its own YAML test file, and the tests will be executed in parallel using a GitHub Actions workflow.
Export user stories from your source (TestRail, CSV, or Jira) and save them in a structured format (for example, JSON or CSV). For example:
user_stories.csv
):User Story ID | User Story Title | Description |
---|---|---|
1 | Log in to the application | User logs in with valid credentials. |
2 | Search for a product | User searches for a product by name. |
3 | Add product to cart | User adds a product to the cart. |
Create a Node.js script to read the exported data and generate individual YAML test files for each user story.
generate-tests.js
)This script will generate individual YAML test files (for example, test_1.yaml
, test_2.yaml
) in the testdriver/
directory.
Create a GitHub Actions workflow to execute the generated test files in parallel.
.github/workflows/run-tests.yaml
)Store your TestDriver API key as a GitHub secret (for example, TD_API_KEY
) to securely authenticate your tests.
generate-tests.js
script, user_stories.csv
, and .github/workflows/run-tests.yaml
to your repository.main
branch.The GitHub Actions workflow will automatically:
testdriver/
directory.Generated Test Files:
testdriver/test_1.yaml
testdriver/test_2.yaml
testdriver/test_3.yaml
GitHub Actions Dashboard:
This setup automates the process of converting user stories into individual test files and running them in parallel using GitHub Actions. It ensures comprehensive test coverage while optimizing execution time.