Skip to content

PerfectoMobileSA/json2xml-api-export

Repository files navigation

Perfecto Reporting API JSON to Junit XML Exporter

This command line interface is designed to extract XCTest and Espresso test execution results for a single test suite from the Perfect Reporting API via REST and convert the resulting JSON to Junit XML and write it to a file.

Usage

Either run at the command line:

com.perfectomobile.Exporter -c=https://example.app.perfectomobile.com -s=[SECURITY TOKEN OBTAINED FROM PERFECTO QUALITY LAB CLOUD] -e=[GUID REPRESENTING TEST SUITE EXECUTED IN THE PERFECTO QUALITY LAB] -x=./TestSuites.xml

Or create an Eclipse run configuration:

Page One

Page Two

Required Arguments

  • c | perfectoCloudReportingServer
  • s | perfectoSecurityToken
    • Example: -s=[SECURITY TOKEN OBTAINED FROM PERFECTO QUALITY LAB CLOUD]
  • x | xmlOutputFilePath
    • Example: -x=./TestSuites.xml

Optional Arguments

  • l | list [all executions in the past 24 hours]
    • Example: -l
  • e | testExecutionId
    • Example: -e=[GUID REPRESENTING TEST SUITE EXECUTED IN THE PERFECTO QUALITY LAB]
  • t | tag
    • Example: -t=ExampleTestTag
  • j | jsonOutputFilePath
    • Example: -j=./TestSuites.json
  • v | verbose
    • Example: -v

Export Executable Jar

To create an executable jar in Eclipse, select the File menu | Export. In the export wizard, choose Java > Runnable JAR file. Follow the wizard to select your launch configuration and file path.

Page One

Page Two

See also Create runnable jar with Eclipse.

Reference

Perfecto API documentation

Junit XML reference

Special Thanks

The core of the TestUnits XML class used to serialize the results was borrowed from Adam Gent.

About

Export XCTest and Espresso executions into Junit XML format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages