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

Time value being returned as NaN for testcases #193

Open
mtweisenbarger opened this issue Aug 29, 2018 · 3 comments
Open

Time value being returned as NaN for testcases #193

mtweisenbarger opened this issue Aug 29, 2018 · 3 comments

Comments

@mtweisenbarger
Copy link

mtweisenbarger commented Aug 29, 2018

Hello! I really hope someone can help me out with this. So I work for jbHunt and we have a suite of tests that run using protractor, jasmine2, typescript, and angular through TFS/VSTS Continuous Integration. We are using the Jasmine Reporter JUnit to print the results in TFS for graphs and other types of reporting. The issue we are having is sometimes (its very random) we are getting a "NaN" value returned on the "time" property from the reports. I have uploaded an example of the error.
junitresults-RegressiontestSearchRoutesEditRouteFinalize.txt

As you can see the reporter does work (as evidenced by the many steps showing a proper time) but still there are others (regardless of pass or fail) that show NaN. The real issue we are having is the built in TFS module that parses the results has no way to deal with NaN values. That powershell script is out of our control (all in Microsoft's hands) so there isn't anything I can do about it. They return this result when there is a NaN value: ##[warning]Failed to publish test results: TimeSpan does not accept floating point Not-a-Number values.

Is there any fix that can be made on the reporter side that will handle for NaN values? Thank you for your assistance.

@mtweisenbarger
Copy link
Author

Just wanted to update this, Microsoft has developed a fix for our issue. Here is the upcoming push: microsoft/azure-pipelines-agent@980268d

Just letting everyone know.
Thanks.

@mtweisenbarger
Copy link
Author

This was never fixed on the jasmine reporter side; Microsoft provided a solution for us. But the issue can still occur.

@mtweisenbarger
Copy link
Author

The solution provided by Microsoft did not work, can someone please fix the reporter to ensure no "NaN" values are passed for the "time" in the xml? Even if they are simply converted to a 0 that would be fine. Thank you.

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

1 participant