Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

refs #209 - added time attribute to testsuite and testcases in xunit xml #319

Closed
wants to merge 1 commit into from

Conversation

ewatch
Copy link

@ewatch ewatch commented Dec 14, 2012

Added "time"-attribute to the tags <testsuite> and <testcase>.
The time-attribute of the tag <testsuite> consists of the summary of all <testcase> time-attributes.

There were also tests added for this functionality.

*/
Tester.prototype.calculateSuiteDuration = function calculateSuiteDuration() {
var sum = 0,
sumArray = function(array) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use Array.prototype.reduce() to achieve the same result :)

[1, 2, 3].reduce(function(a, b){ return a + b; }) // 6

n1k0 pushed a commit that referenced this pull request Dec 16, 2012
@n1k0
Copy link
Member

n1k0 commented Dec 16, 2012

Merged in 12272ea. I took the liberty to adapt the code a bit.

@n1k0 n1k0 closed this Dec 16, 2012
@ewatch
Copy link
Author

ewatch commented Dec 17, 2012

That's totally fine with me. Thanks for you tip. I also saw that you also used the concat method which I also wanted to introduce now to the code. Nice, that I could contribute something to the project. I am looking forward to push other things forward as well.

@fwebdev
Copy link
Contributor

fwebdev commented Oct 21, 2013

I added a pullrequest to change the attribute "duration" to "time". Otherwise Jenkins will not read the File properly.
#681

hubpan pushed a commit to hubpan/casperjs that referenced this pull request Feb 7, 2014
GhostDriver Development Branch - Master Push #4
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