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 handling should be centralized #1

Open
vrchmvgx opened this issue May 18, 2020 · 4 comments
Open

Time handling should be centralized #1

vrchmvgx opened this issue May 18, 2020 · 4 comments

Comments

@vrchmvgx
Copy link

Currently, different methods of handling time data or lack thereof are spread across the different handlers (particularly JUnit). As a developer, I would like to see

  • Support for either elapsed time or start/end time data for each keyword
  • No handler-specific time manipulation or metadata modification in the handler, except for the previous bullet point
@hernandik
Copy link

I'm using the library and found that the second bullet "No handler-specific time manipulation or metadata modification in the handler, except for the previous bullet point" is what I'm suffering while trying to use it.
There are some expectation on that fix?
The junit time info is not being considered while generating the robot.xml file.

@Tattoo
Copy link
Contributor

Tattoo commented Aug 8, 2022

@hernandik,

this issue is about improving the current logic and where in codebase it should reside. It sounds to me you have found problem with JUnit handler, which would possibly be a separate bug.

Could you describe here the specific problem you are facing?

@hernandik
Copy link

hernandik commented Aug 8, 2022

@Tattoo I got a JUnit result. It contained test cases and each testcase contained a time item, giving the elapsed time for a test.

Example bellow. Them I parse it with Oxygen, but the output start/finish date do not take into account the elapsed time for the test. I understand that my junit does not contain initial/finish time for tests, but at least it contain the time that each test took to run.

But this information end lost, and the xunit (robot xml) does not contain such time information for individual tests.

I would like that at least, this report start/end time could take into account the time field form the origin file to take into account.

Files below are just a snip of the original and final files. I change the test names and suite names.

Original file

<testsuites>
<testsuite tests="24" failures="0" time="316.525" name="test1">
<properties>
<property name="go.version" value="go1.16.15"/>
</properties>
<testcase classname="test1" name="test_suite1" time="19.330"/>

Parsed file by oxygen

<robot generator="Robot 4.1.2 (Python 3.9.13 on linux)" generated="20220808 11:06:06.878" rpa="false" schemaversion="2">
<suite id="s1" name="JUnit Execution">
<suite id="s1-s1" name="test_suite1">
<test id="s1-s1-t1" name="teste1">
<kw name="Pass Execution" library="BuiltIn">
<arg>Test passed :D</arg>
<doc>Skips rest of the current test, setup, or teardown with PASS status.</doc>
<msg timestamp="20220808 11:06:06.910" level="INFO">Execution passed with message: Test passed :D</msg>
<status status="PASS" starttime="20220808 11:06:06.910" endtime="20220808 11:06:06.911"/>
</kw>
<status status="PASS" starttime="20220808 11:06:06.909" endtime="20220808 11:06:06.911">Test passed :D</status>
</test>

@hernandik
Copy link

I opened a new issue for this topic that I mentioned above.

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

3 participants