mikepenz/xray-action

Unable to import results from serenity to x-ray

sahni619 opened this issue · 13 comments

Hi,

I am facing this issue with the action. It is configured, and running but it's not importing results from the .html file to x-ray.

If you see below screenshot, I get no error, but it just doesn’t import anything

Screenshot 2022-02-11 at 7 09 31 PM

Can any one help with this issue?

@sahni619 given the screenshot it looks like it did not find any files.

Are you sure there are reports in the defined path? Also (I am not an expert in cucumber specifically) but are those really .html reports?

Based on the official doc it looks they should be .feature files? https://docs.getxray.app/display/XRAY/Importing+Cucumber+Tests+-+REST

Thanks @mikepenz for chiming in. So, when I run my project on my local using mvn clean verify, it generates a target folder with index.html. This file when opened in chrome have all the information like the features I have written to test.

I also tried to use testPaths: "**/test/features/*.feature" because that's where my feature file resides, but it does the same thing.

But I am not sure if the endpoint which is mentioned in the docs is configured in the action?

The *.html file is usually the report which is only meant for direct viewing things. but usually reports imported into systems are in a different format (like the documentation in *.feature)

The action retrieves files via this method herE:
https://github.com/mikepenz/xray-action/blob/main/src/processor.ts#L84-L88

https://github.com/mikepenz/xray-action/blob/main/src/utils.ts#L115-L118

Given this log message here:
https://github.com/mikepenz/xray-action/blob/main/src/processor.ts#L155

The globber could not find any files matching your path definition.

Looks like "**/test/features/*.feature" does not lead to results

Closed by mistake

I did some changes in the path and now it gives me above issue. Thanks for your support @mikepenz

Do you have the cucumber export as json? Cucumber json reports are supported.

I am sorry that I forgot about it, but *.feature files are not yet supported. Please see here: #320

Screenshot 2022-02-15 at 6 49 21 PM

So, I tried the json as well. I am getting cucumber-reports in json format, but still unable to import. Not sure why. Is there something I may be missing?

The 400 bad request is returned from the xray API.

Please make sure respective configuration details match your environment.

XrayCloud, ...

Hi @mikepenz Thanks for your response and help. I contacted Xray support and they want me to give them the exact command we are using while importing cucumber results. Can you help me with that?

Also, I am able to import junit format without any issues. It's just when I am trying cucumber reports

Depending on the config either:
https://github.com/mikepenz/xray-action/blob/main/src/xray-cloud.ts#L112-L114
or
https://github.com/mikepenz/xray-action/blob/main/src/xray-cloud.ts#L132-L133
will be used.

You can enable debug logging in github actions to see which endpoint is used.

Please report back, otherwise will close for inactivity