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

Add replay links to other reporter output #254

Merged

Conversation

ryanjduffy
Copy link
Contributor

Adds replay URLs to the reporter XML files generated by junit with cypress

@socket-security
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
txml 3.2.5 None +2 167 kB nickeltobias

@ryanjduffy
Copy link
Contributor Author

Here's the resulting (formatted) output from the CI run of this change on flake with the URL added in two places: a property on the root suite and in the error message as DS does.

<?xml version="1.0" encoding="UTF-8">
<testsuites name="Mocha Tests" time="11.0730" tests="9" failures="1">
    <testsuite name="Root Suite" timestamp="2023-09-27T20:45:00" tests="0" file="cypress/e2e/adding-spec.ts" time="0.0000" failures="0">
        <properties>
            <property name="Replay URL" value="https://app.replay.io/recording/fb534099-5683-467e-b021-3bf810955495"></property>
        </properties>
    </testsuite>
    <testsuite name="TodoMVC" timestamp="2023-09-27T20:45:00" tests="0" time="0.0000" failures="0"></testsuite>
    <testsuite name="New Todo" timestamp="2023-09-27T20:45:00" tests="8" time="10.3900" failures="1">
        <testcase name="TodoMVC New Todo should allow me to add todo items" time="1.7580" classname="should allow me to add todo items"></testcase>
        <testcase name="TodoMVC New Todo adds new items using a custom command" time="1.1080" classname="adds new items using a custom command"></testcase>
        <testcase name="TodoMVC New Todo adds items" time="1.3870" classname="adds items"></testcase>
        <testcase name="TodoMVC New Todo should clear text input field when an item is added" time="1.8670" classname="should clear text input field when an item is added"></testcase>
        <testcase name="TodoMVC New Todo should append new items to the bottom of the list" time="1.3650" classname="should append new items to the bottom of the list"></testcase>
        <testcase name="TodoMVC New Todo should trim text input" time="1.7620" classname="should trim text input"></testcase>
        <testcase name="TodoMVC New Todo should show #main and #footer when items added" time="1.1430" classname="should show #main and #footer when items added"></testcase>
        <testcase name="TodoMVC New Todo should fail on this test" time="0.0000" classname="should fail on this test">
            <failure message="Timed out retrying after 4000ms: Expected to find content: &apos;Sorry, something went wrong&apos; but never did." type="AssertionError">AssertionError: Timed out retrying after 4000ms: Expected to find content: 'Sorry, something went wrong' but never did.
                 at Context.eval (webpack:///./cypress/e2e/adding-spec.ts:99:49)

              View in Replay
              * https://app.replay.io/recording/fb534099-5683-467e-b021-3bf810955495</failure>
        </testcase>
    </testsuite>
    <testsuite name="Adds items (spy example)" timestamp="2023-09-27T20:45:16" tests="1" time="0.6830" failures="0">
        <testcase name="TodoMVC Adds items (spy example) calls inform" time="0.6830" classname="calls inform"></testcase>
    </testsuite>
</testsuites>

@ryanjduffy ryanjduffy merged commit 1fbd679 into main Sep 28, 2023
3 checks passed
@ryanjduffy ryanjduffy deleted the ryan/scs-1402-add-replay-links-to-other-reporter-output branch September 28, 2023 15:14
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

Successfully merging this pull request may close these issues.

2 participants