lundi 16 juillet 2018

How can I change the default Jenkins test name using Cucumber JVM? test name derived from .feature file

The test framework consists of Java, Cucumber, Selenium; and tests are executed nightly using Jenkins to execute a maven build process. The problem is that for failed tests, every test name reported by Jenkins is the concatenation of the entire row of test data input from the .feature file.

For example, in Jenkins a test failure resulted in the failed test name below (obnoxiously long!):

Given I search the workspace 'Public' for a type 'Tool' using attribute 'Tool Name' condition 'Contains' and value 'Pliers'(| UI.CADToolProject.Evaluate.PublishNewManufacturingAnalysisLink | \share.mydomain.com\common\svn\tools\mycompanytools\QA-Automation\ToolsProject\ | testtool-4.part | PublishNewAnalysisLink01 | ToolsGroup | Pliers | WEB_ELEMENT__PATH | Public | Tool | Tool Name | Contains | testtool-4 |).Given I search the workspace 'Public' for a type 'Tool' using attribute 'Tool Name' condition 'Contains' and value 'testtool-4'

I would like to programmatically update the appropriate cucumber object used by Jenkins to generate the Jenkins Test Name. The Jenkins test name above should be = Publish Manufacturing Link.

Can anyone tell me which Cucumber object I will need to modify, and provide an example of updating it with the desired test name? If you have an alternate approach for displaying the Jenkins test name that works for you, please explain how you do it and provide an example.

Thanks!

Aucun commentaire:

Enregistrer un commentaire