qTest parser for MSTest (.trx) test result files.
Tricentis qTest is a Test Management tool. It's centralizing automated test execution and management, qTest Launch enables enterprises to scale test automation.
Problem Statement: So far no in-built parser is available for MSTest (.trx) test result files in qTest, but qTest offers the option to create and use custom parsers which is what has been attempted here for MSTest (.trx) test result file types.
-
Can parse multiple MSTest test result (.trx) files.
-
Generated output log file attachment details.
== OUTPUT == <This section contains console/test context output logs> == ERROR INFO (MESSAGE) == <This section contains error message in case of test failure> == ERROR INFO (STACKTRACE) == <This section contains error details in case of test failure> == RESULT FILE ATTACHMENTS == <This section lists out all test result attachment files>
-
Parser mapping configuration as per qTest automation mapping under 'Automation Settings'
MSTest test outcome statuses Mapped qTest automation status Failed FAIL Inconclusive SKIP Passed PASS Error FAIL Timeout FAIL Aborted FAIL Unknown SKIP NotExecuted SKIP
-
Download zipped parser from latest release under Releases.
Artifact Name: "qtest-mstest-parser.zip".It can also be downloaded form latest successful "qTest-MSTest-Parser" workflow artifacts.
-
Required zipped file contents (for manually creating zipped file)
node_modules/ package.json package-lock.json parser.js
NOTE: Generated 'node_modules' package folder also needs to be part of the zipped file.
-
-
Add below parser details and 'SAVE'.
- Name: <name of parser>
- Version: <version of parser>
- Zip package: <path to the downloaded parser .zip file>
-
Once the parser is saved the custom parser should be created in the list.
-
From automation host agent add new agent and provide below details.
- Agent Name: <name of agent>
- qTest Manager Project: <qTest project to execute automated tests for>
- Agent Type: "Universal Agent"
- Pre-Execute Script: <pre-execute script>
- Execute Command: <execution script>
- Path to Results: <path to the test result (.trx) files>
- Result Parser: <MSTest (custom) parser added above>
NOTE: Ensure the final command in 'Executor' block does not generate failed output (e.g. test run with failed tests), may avoid the parser from executing. To avoid try adding log output command in the end. (e.g. batch -> echo Completed)
echo :::: EXECUTION STARTED :::: <Path to>\VsTest.console.exe <Path to>\Test.dll /TestCaseFilter:Name=Test1 /Logger:trx;LogFileName=TestResultFile.trx echo :::: EXECUTION COMPLETED ::::