Skip to content

[🐛 Bug]: Jenkins pipeline failing with latest WDIO version #14374

@nair-sumesh

Description

@nair-sumesh

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

latest

Mode

Standalone Mode

Which capabilities are you using?

reporters: [
    'spec',
    'dot',
    ['junit', {
      outputDir: `${process.env.WORKSPACE ? process.env.WORKSPACE + "/" : ""
        }${process.env.SPEC ? process.env.SPEC + "/reports" : "./reports"}`,
      errorOptions: {
        error: 'message',
        failure: 'message',
        stacktrace: 'stack'
      },
      outputFileFormat: function (options) { // optional
        return `results-${options.cid}.xml`
      }
    }]

  ],

}

What happened?

Since I upgraded the WDIO from 9.7.1 to 9.12.3, the Jenkins pipeline started failing.
The test has passed successfully, however, the jenkins JUNIT plugin is unable to find the xml files.

VESRION UPGRADE

Image

OBSERVATIONS

  • What more confusing is that, when I execute the test locally, I could see the XML files generated.
  • When the same job is executed with previous version ( 9.7.1 ) of wdio, the pipeline is green again.
  • The issue is only observed for cucumber test. The mocha test jenkins pipeline is green with version 9.12.3 and 9.7.1.

What is your expected behavior?

Jenkins job should finish with success, generating the proper JUNIT output.

How to reproduce the bug.

Since the test is successful, but the post test step in Jenkins pipeline is failing, I am not sure what steps to provide here.

Relevant log output

OUTPUT

Image

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🐛help wantedIssues that are free to take by anyone interested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions