0
votes

System: Macbook Pro

Currently I'm running Jenkins on my macbook pro but it seems that Jenkins Junit report post actions plugin is unable to locate my .xml reports, once my WebdriverIo framework has executed my test scripts.

The report xml file is being generated, including triggering of the tests, it seems that Jenkins is unable to locate my JUnit reports folder? enter image description here

2
Any progress on this Sam? - iamdanchiv

2 Answers

1
votes

More importantly... what are you seeing in the Test Result view? You should be seeing something like this:

enter image description here

Let's isolate the problem!

  1. The JUnit reporter setup in wdio.conf.js file;
  2. Post-build Actions setup for the JUnit reporter (in Jenkins);
  3. Verify the build Workspace (in Jenkins, post test-run);
  4. Others

1.

( My JUnit Reporter wdio.conf.js config )

reporters: ['junit'],
reporterOptions: {
    'junit': {
        outputDir: './reports',
        outputFileFormat: function(opts) {
            return `results-webdriverio.${process.env.USER}.${opts.cid}.xml`;
        }
    }
}

2.

( My setup for JUnit Reporter )

enter image description here

Most likely you have an issue with the path to the JUnit .xml. Use relative paths! (e.g: reports/*.xml, reports/**/*.xml, etc.).

Note: Basedir of the fileset is the workspace root.

3.

Check your build Workspace and see if the .xml report has indeed been generated and is residing in your path (e.g: in the /reports folder).

If not, then I'd go into the Console section and start looking into your build logs to see where the issue is.

!Note: I get the same Jenkins input errors (red notifications), but as far as I know, I have been always getting them. The .xml reports still get evaluated by the JUnit plugin.

0
votes

What's the root of your workspace?

If it's \Users\joeblogs\Desktop\webdriverio2\, then reports\junit-result\*.xml would be enough.

It seems like you are trying to provide a absolute path, maybe try delete the first two ** before \Users.