Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
protractor-junit-xml-plugin
Advanced tools
A Protracotor plugin. Report results in junit xml format including requirement ids if available.
Description: This plugin is a protractor reporter plugin that reports the test results in JUnit XML file so if you are looking for a plugin to export JUnit XML results you are at the right place. This plugin also has an additional option to parse and extract Xray Id (A JIRA plugin to identify requirements) from a test name and put it in a separate attribute in the output exported XML. This can help in exporting test results with xrayId and link the test to a requirement in Xray Jira (Continuous Integration). It also has an option to just use tests with an xrayId and ignore the tests that don't have an XrayId. By default these additional options are turned off. Please see the configuration section for the option details
This plugin is dependent on the node modules "xmlbuilder currently 12.0.1" and "xml2js-parser currently v1.1.1"". Although these dependencies should be install automatically when this plugin would be installed using npm
The easiest way is to keep protractor-junit-xml-plugin
as a dependency in your package.json
pointing to its current repo
npm install protractor-junit-xml-plugin --save-dev
To update to the latest version
npm update protractor-junit-xml-plugin
For an example of a protractor config file for this plugin, please see plugin section of protractor.conf.js located in the tests folder of this plugin
The following are the configurable options
outdir: output directory of the test results, if not specified it defaults the directory name to "_test-reports"
filename: the filename starting of output result file, if not specified it defaults the file name to "test-results.xml"
parseXrayId: If set to true it will try to extract Xray Jira id from the test name and put it in the attribute "requirement" in testcase result xml. The id should be in between two colons e.g ":XRAY-1234: test to check report graphs". The result testcase element would be like <testcase name="Failing test with xrayId" ... requirements="XRAY-1234">. This is helpful if this tet is attached to a jira requirement and you want to report back the result(Continuous Integration).
if not specified it defaults to "false"
xrayIdOnlyTests: If set to true, it will only consider the tests that have Xray Jira Id in their name. If not specified it defaults to "false"
uniqueName: If set to true, it will generate a unique name for the filename. Default is true. This can not be true if appendToFile is also true.
appendToFile: If set to true, it will append xml data to the bottom of the file instead of creating a new file or overwriting the file. This can not be true if uniqueName is set to true. Default is false
After setting the plugin config in the protractor config file (usually named as protractor.conf.js). This plugin would run everytime you run the tests. It will generate the junit output xml in the specified output directory. For each browser there will be a seapate junit out xml file. For e.g if we have set two browsers in our protractor config lets say firefox and chrome and we gave filename option in plugin cofig as e2e-tests
then the file names will be
If the result file already exist then the plugin will not overwrite it but it will append the current test results in a new testsuite
element with a timestamp
This module includes a tests folder that contains a simple node test app and end to end(e2e) tests of the plugin. The e2e tests are in protractor. To run the tests
npm install
.npm i -g protractor
node tests/testapp/server.js
(tested on node v10).protractor tests/protractor.conf.js
We are actively using this plugin for our protractor e2e tests and have not seen any issues so for. Please contact us if you run into any issues.
You can contact any of us if you run into any issues
We needed a protractor plugin to export our test results to a JUnit XML file with XRay Ids so we wrote this plugin. We have tried to make it general with the configurable options so that it can be as useful as possible. We thank you to "Philips Health Solutions" in general to give us opportunity to write this plugin. We are also very thankful to Ryan Gatto for his positive and supportive efforts all along.
FAQs
A Protractor plugin. Report results in junit xml format including requirement ids if available.
The npm package protractor-junit-xml-plugin receives a total of 258 weekly downloads. As such, protractor-junit-xml-plugin popularity was classified as not popular.
We found that protractor-junit-xml-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.