★ wanayoo — archive 1999 https://github.com/utPLSQL/utPLSQL-cli/issues/61Nouvelle recherche | Portail wanayoo
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

Wrong times in jenkins test result view for run time of tests #61

Closed
tkleiber opened this issue Feb 2, 2018 · 11 comments
Closed

Wrong times in jenkins test result view for run time of tests #61

tkleiber opened this issue Feb 2, 2018 · 11 comments

Comments

@tkleiber
Copy link

@tkleiber tkleiber commented Feb 2, 2018

Don't know it this issue fit's here or should be in the utplsql project direct.

See first the console output:

console

There you see, that the test running 142 seconds.

But the test results view show 4 year and 6 month running, all the other durations are wrong too:

test_result

@pesse
Copy link
Member

@pesse pesse commented Feb 2, 2018

Can you share the command you're running and its parameters?

@tkleiber
Copy link
Author

@tkleiber tkleiber commented Feb 2, 2018

I think the problem is that ut_xunit_reporter creates it's output with the date format of the database, which is our case german, and therefore with commas instead of points:

<testsuites tests="532" skipped="6" error="0" failure="1" name="" time="142,204166" >

@pesse
Copy link
Member

@pesse pesse commented Feb 2, 2018

I see. If I remember correctly you need to have the database in German for some of your tests are dependent on that. Otherwise the latest cli (development branch) now reacts to NLS_LANG-environment variable so you could set that to en_US.

@jgebal should we force specific number-format on our reporters? Maybe at least xunit reporter?

@jgebal
Copy link
Member

@jgebal jgebal commented Feb 2, 2018

That is a good question.
What if Jenkins us running in German too?
Will it still accept "." as separator?

@tkleiber
Copy link
Author

@tkleiber tkleiber commented Feb 2, 2018

No - my database is by default in German. I have to switch to several other languages to ensure, that some outputs remains in a defined language and some have to change, for an example an English colleague calls a invoice for a Spanish customer. In this case the GUI has to be shown in English but the invoice report furthermore in Spanish.

I don't have Jenkins here in German, only the GUI is german, so cannot test this there.

Does not find, if the junit5 xml formatter is dependent from environment, maybe this would help?

@pesse
Copy link
Member

@pesse pesse commented Feb 2, 2018

@tkleiber Not sure if I understand your usecase properly. You want

run CI database in German (NLS_SETTINGS-wise) but get en_US number-format for xunit-report?

or

run CI database in en_US (not possible with cli 3.0.4, but with the current development branch)?

@tkleiber
Copy link
Author

@tkleiber tkleiber commented Feb 2, 2018

Test objects run in database, where following is set according to nls_database_parameters:
NLS_LANGUAGE GERMAN
NLS_TERRITORY GERMANY

Test sessions has to be run in different nls_session_parameters as described above.

Jenkins run on Linux and seems to require English number format in the times in the xunit-reports.

Junit4 itself seems to create ever English (or UTF-8) format independent from java user.language etc., so:
time="142.204166" instead of time="142,204166"

@jgebal
Copy link
Member

@jgebal jgebal commented Feb 2, 2018

I wonder.
Isn't XML enforcing a standard of "." as separator?
Maybe we should fix it in the reporter.

@pesse
Copy link
Member

@pesse pesse commented Feb 2, 2018

You're right, it is according to w3c XML Schema:
https://www.w3.org/TR/xmlschema-2/#decimal

decimal has a lexical representation consisting of a finite-length sequence of decimal digits (#x30-#x39) separated by a period as a decimal indicator

@jgebal
Copy link
Member

@jgebal jgebal commented Feb 2, 2018

Submitted new issue to utPLSQL.

@jgebal
Copy link
Member

@jgebal jgebal commented Feb 4, 2018

@tkleiber - this fix will be part of next release of utPLSQL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.