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

XUnit report shows only autogenerated names for the contexts #674

nrogachev opened this Issue May 16, 2018 · 4 comments


None yet
2 participants
Copy link

nrogachev commented May 16, 2018

Using the same example package as in #672

This is plain console output is fine, screenshot:

But this is how it looks like in Jenkins:

I'm not sure if it is a reporter issue or a Jenkins issue (our Jenkins is kinda old - 2.58)


This comment has been minimized.

Copy link

nrogachev commented May 17, 2018

There is also another issue with the auto-generated context names. If you include a test case in the named context then it becomes practically impossible to run a single test case via runner.
Using the same example as above, let's say I want to run single test case test1.
If this test case is not a part of the context then the call would look like that:'SCHEMA:de.suit1.TestPkg1.test1')
But if it is in the context then it seems it must be'SCHEMA:de.suit1.TestPkg1.context_1.test1')

I think in a big package it can be hard to correctly associate a specific test case with a context number to which it belongs.


This comment has been minimized.

Copy link

jgebal commented Jun 1, 2018

Thanks for reporting this issue.
I don't have a good idea on how to resolve that.
There is a conflict as:

  • element names (package/procedure/context) cannot have spaces etc.
  • element descriptions should be meaningful and human readable

In current implementation (3.1.0-3.1.1) there is no place to set the name of a context - we can only set description.

Perhaps we should change that and add validation of context names (no spaces)?
So that if you want a description, you would use the description annotation within the context.


package name_of_the_suite is

--%suite(Description of the suite)

procedure setup;

--%description(Context Description)

--%test(description of the test)
procedure name_of_the_test;


This comment has been minimized.

Copy link

jgebal commented Jun 1, 2018

Alternatively we could still consider the attribute of context as description and convert spaces to underscores but that could result in very long names, when context have long descriptions.

This also limits the flexibility and prevents from having separate name from description.


This comment has been minimized.

Copy link

nrogachev commented Jun 1, 2018

@jgebal hi Jacek.
Actually i've already slightly modified the JUnit reporter, and it doesn't seem to have any issues with spaces. I'm basically creating a replacement map and using it in get_path and print_suite_elements. It is probably not the most elegant solution but in my case it seems to be working, i have descriptions in the Jenkins report.
If you want, I can provide you my modification.

But of course it does not help the calling problem (#679).

Speaking of you ideas above, i personally like the first one more.
Maybe it will also make sense to change the suit and test annotations and force putting description for the suite/test in a separate --%description annotation.
By doing so we will have some kind of uniformity:
--%suite - defines package as a test suite (name = package name)
--%description(Nice Suite Description)

--%context(context_name) - analogue to the package name / suit name, if not provided then generated like now "context_1" etc.
--%description(Context Description)

--%test - defines procedure as a test case (name = procedure name)
--%description(Test Case Description)

jgebal added a commit that referenced this issue Jun 7, 2018

Fixed running single test procedure in context by path
Changed context naming (context name can be now explicit)
Context description is now only set from `--%displayname` annotation
Resolves #679
Resolves #674

Fixed most of compiler-warnings

@jgebal jgebal closed this in #695 Jun 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.