8000 refs #966 - read optional 'name' property from failure by davidlinse · Pull Request #967 · casperjs/casperjs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 19, 2020. It is now read-only.

refs #966 - read optional 'name' property from failure #967

Conversation

davidlinse
Copy link
Contributor

Allow to pass in a custom name to casper.test.fail() which is used in the junit xml report.

this.test.fail('My custom failure message', {name: 'My custom test-case name'});

will produce the following xml.

<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="0.383">
    <testsuite errors="0" failures="1" name="demo" package="./custom-test-case-name" tests="1" time="0.383" timestamp="2014-07-04T11:09:11.072Z">
        <testcase classname="./custom-test-case-name" name="My custom test-case name" time="0.165">
            <failure type="fail">My custom failure message</failure>
        </testcase>
        <system-out/>
    </testsuite>
</testsuites>

What do you think about it guys?

best regards
~david

@Fanch-
Copy link
Fanch- commented Jul 4, 2014

Relevant to #912 and PR #920

@mickaelandrieu
Copy link
Member

Hi,
can you please add docs, and maybe a test ?
Regards,

@davidlinse
Copy link
Contributor Author

@mickaelandrieu are you ok with this ?

Update: It looks like travis is failing for other reasons..

@mickaelandrieu
Copy link
Member

I do :)
ping @n1k0 can you review this please ?

@davidlinse
Copy link
Contributor Author

Any news on this ?

@mickaelandrieu
Copy link
Member

Hi,

can you rebase your commits ? I'll merge this cc/ @n1k0

@davidlinse
Copy link
Contributor Author

@mickaelandrieu i rebased to lastest master..

@mickaelandrieu
Copy link
Member

Can you squash your commits too? I swear it's my last request :D

@davidlinse
Copy link
Contributor Author

Completed..

This allows to pass in a custom name which is used
in the junit xml report.
mickaelandrieu added a commit that referenced this pull request Aug 17, 2014
…in-junit-report

refs #966 - read optional 'name' property from failure
@mickaelandrieu mickaelandrieu merged commit 5b3bbd5 into casperjs:master Aug 17, 2014
@mickaelandrieu
Copy link
Member

Thank you @davidlinse !

@davidlinse
Copy link
Contributor Author

Thanks for merge.. 🍻

@davidlinse davidlinse deleted the allow-custom-test-case-names-in-junit-report branch August 17, 2014 23:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0