This command line interface allows you to upload your automated test results to TestQuality. Automated test results must be outputted in JUnit XML format, which most test automation tools will provide. Test result attachments and related defects are also supported through test name tags or console outputs.
For DEFECTS we expect the following tag format for both test name tags and console ouptuts.
- GitHub Defects [[DEFECT|22]]
- Jira Defects [[DEFECT|TQ-123]]
For ATTACHMENTS the following format is expected:
- Attachments from test name tag [[ATTACHMENT|ScreenshotFileName.png]]
- Attachments from console output [[ATTACHMENT|path/to/file]]
Note that for attachment you will need to use 'run_result_output_dir' option to specify the test result output directory.
In order to upload xml you will need to:
- Create a target Test Plan
- Authenticate with TestQuality
- Run command to upload files
There are compiled commands for
- Windows
- MacOS
- Linux
- Alpine
Commands can be downloaded from cli.testquality.com
Note: For alpine you must install libstdc++
apk add --no-cache libstdc++
For list of commands
yarn start --help
or
testquality-macos --help
For command help
yarn start login --help
or
testquality-macos login --help
Include --save
to save tokens to use with other commands.
Example workflow.
testquality-macos login [email protected] *password* --save
testquality-macos upload_test_run 'sampleXml/*.xml' --project_name=Test --plan_name=Test
You can also create a manual test plan run.
testquality-macos create_manual_run --project_name=My_Project --plan_name=My_Test_Plan --run_name=Test_Run_Name
CSV Files
testquality-macos upload_csv ./test_run_results.csv --cf ./test_run_results.config
Personal Access Token (PAT)
Add the --access_token=pat
where pat equals token to any command.
Or
Save token into .env or environment with TQ_ACCESS_TOKEN=pat
where pat equals token
yarn
yarn build
yarn start login <username> <password>
yarn package
yarn serve
Retrieve an authentication token and authenticate your Docker client to your registry. Use the AWS CLI:
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 092049816521.dkr.ecr.us-east-1.amazonaws.com/test-quality-cli
Note: If you receive an error using the AWS CLI, make sure that you have the latest version of the AWS CLI and Docker installed.
Build your Docker image using the following command. For information on building a Docker file from scratch see the instructions here
docker build -t test-quality-cli .
Run your Docker image local.
docker run --name test-quality-cli -p 80:80 --rm test-quality-cli
After the build completes, tag your image so you can push the image to this repository:
docker tag test-quality-cli:latest 092049816521.dkr.ecr.us-east-1.amazonaws.com/test-quality-cli:latest
Run the following command to push this image to your newly created AWS repository:
docker push 092049816521.dkr.ecr.us-east-1.amazonaws.com/test-quality-cli:latest
Kubernetes
kustomize build kustomize/overlays/<<environment>> | kubectl apply --dry-run --validate -f -
kustomize build kustomize/overlays/<<parameters.environment>> | kubectl apply --record=true -f -
For Plan
-
Login
-
List plans that have been deleted
testquality-macos plans --revision_log -p _sort=-updated_at -p operation=delete
-
Restore
testquality-macos restore --plan_id 17452
For Suite
-
Login
-
List suites that have been deleted
testquality-macos suites --revision_log -p _sort=-updated_at -p operation=delete
-
Find associated plans
testquality-macos plan_suite --revision_log -p _sort=-updated_at -p operation=delete -p suite_id=105923
-
Restore
testquality-macos restore --suite_id 105923 --plan_id 17452
--params.per_page -1 --params._with test // gives us: {per_page: -1, with: 'test'}