Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting the report after running cucumber programmatically #2381

Closed
OhadR opened this issue Mar 11, 2024 · 1 comment
Closed

getting the report after running cucumber programmatically #2381

OhadR opened this issue Mar 11, 2024 · 1 comment

Comments

@OhadR
Copy link

OhadR commented Mar 11, 2024

hi,

I am running cucumber programmatically this way:

i have a "loader" function:

    let support;
    const resolvedConfiguration = await loadConfiguration();
    let runConfiguration : IRunConfiguration= resolvedConfiguration.runConfiguration;

and the invocation:

    let result: IRunResult;
    if(!support)   //global variable
        result = await runCucumber(runConfiguration);     
    else
        result = await runCucumber({...runConfiguration, support});

    const success = result.success;
    support = result.support;

my question: is it possible to get the report that is produced after the run? currently, all I get is true/false. but in the logs there is a report, like "https://reports.cucumber.io/reports/6f774943-6d51-44cf-942c-23XXXX" - what is the best practice to fetch it?

thanks in advance!

relevant: #1711
cucumber version: 8,1,2

@davidjgoss
Copy link
Contributor

Thanks for raising @OhadR. Currently there's no easy way to get a hold of that URL, unless you capture your stderr and parse it out of there.

We have an issue #1797 for this already, so I'll close this to avoid duplication, and you can watch that one for updates.

Unfortunately the reports service is currently in a sort of limbo state while we uncouple from our previous corporate backer, so this is unlikely to move for a while. In the meantime I'd suggest using the built-in HTML formatter if it's practical for you. https://github.com/cucumber/cucumber-js/blob/main/docs/formatters.md#html

@davidjgoss davidjgoss closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants