Coder Social home page Coder Social logo

zephyr-scale-file-converter's Introduction

README

A file converter for converting Zephyr for Jira Server/DC or Xray XML files to the Zephyr Scale XML file format. After the conversion, the resulting file can be imported to Zephyr Scale.

Requirements

  • NodeJs 14.x

How to use

  1. Export a XML file from Jira with Zephyr/Xray test cases. It should be one file per project, since the test case import in Zephyr Scale is by project.

  2. Move the exported XML files to the folder input. Files with names starting with . or ~$ will be ignored.

  3. Configure settings on file settings.json:

  • preconditionCustomFieldId: maps a Jira custom field ID to the default Zephyr Scale field precondition.
  • plainTextTestScriptFieldId: maps a Jira custom field ID to a plain text test script. This will ignore the standard Zephyr/XRay test steps.
  • owner: maps the Jira issue assignee or reporter fields to owner. The only accepted values are assignee or reporter. If the owner is set, then the jiraServerSettings configuration is also required to establish a connection with the Jira Server/DC REST API to convert the usernames into user keys.
  • priority: maps Jira priority values to Zephyr Scale values (High, Normal, Low).
  • convertWikiMarkup: set option to convert test case steps from wiki markup format to html. This is needed for some versions of Zephyr, which will export test case steps using wiki markup format.
  • decodeIssueDescription: set option to decode issues description, for when Jira exports this field html encoded.
  • jiraServerSettings: sets credential information to allows this file converter to connect to Jira Server/DC REST API. This is required if the owner setting is configured.

Examples:

{
	"mappings": {
		"preconditionCustomFieldId": "10100",
		"plainTextTestScriptFieldId": "10200",
		"owner": "assignee" // or it could be "reporter",
		"priority": {
			"MyCustomPriority": "High",
			"MyOtherCustomPriority": "Normal",
			"Another": "Low",
			"Last": "Low"
		}
	},
	"convertWikiMarkup": true,
	"decodeIssueDescription": true,
	"jiraServerSettings": {
		"url": "https://jira.mydomain.com", // or it could be "https://mydomain.com/jira", for example
		"user": "myUser",
		"password": "myPassord"
	}
}

If you don't want to map anything, please leave the fields empty or with default values. This should work for most scenarios:

{
	"mappings": {
		"preconditionCustomFieldId": "",
		"plainTextTestScriptFieldId": "",
		"owner": "",
		"priority": {}
	},
	"convertWikiMarkup": false,
	"decodeIssueDescription": true,
	"jiraServerSettings": {
		"url": "",
		"user": "",
		"password": ""
	}
}
  1. Open a terminal window, and navigate to the directory where the repository has been cloned to: cd <zephyr-scale-file-converter-dir>.

  2. Install the Javascript dependencies by executing: npm install.

  3. Run the conversion by executing: npm start.

  4. Check the converted files on folder output/.

  5. Import each converted file in Zephyr Scale using the default import option "Test Management for Jira".

Troubleshooting

Unexpected close tag

Supposing that you have a file named myInput.xml on /input folder. During npm start you get the following error (or similar):

Unexpected close tag
Line: 96315
Column: 251
Char: >

then go to the console command (from inside zephyr-scale-file-converter) and run:

vi temp/myInput.xml

and later go to the line 96316 (note that we are looking for the line stated in the error message + 1) you can do that by pressing ':' and write:

:call cursor(96316,251)

there you will have a > character and what is in the left side is what is were the error happened.

*Note: be aware that you can use other text editors, but other text editors can show the content in a different way (we do recommend to use vi)

Exported some test cases, but the system is importing only one

This is a known error, the error is with the library [email protected]

Workarounds:

  1. Execute this to uninstall xmlbuilder

    npm uninstall xmlbuilder --save-dev
    

    And install the correct version of xmlbuilder dependency, version 2.6.4:

    npm install [email protected] --save-dev
    

    โ†’ Then, run to convert the XML file: npm start

  2. If the problem persists, alternatively, you might manually remove all the extra occurrences of the new converted XML file.

    Remove all extra testCases tags:

     </testCases>
      <testCases>
    

    And also the extra customFields tags:

    </customFields>
    <customFields>
    

zephyr-scale-file-converter's People

Contributors

assisblf avatar dependabot[bot] avatar johnathafelix avatar juboy avatar juro994 avatar nayeligarciac avatar otaviomedeirossb avatar pelizza avatar vmrvictor avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.