-
Notifications
You must be signed in to change notification settings - Fork 15
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
Gitlab CI number of tests is wrong #42
Comments
Hi, I can do some testing with MSTest, which I think may behave differently from other frameworks with regard to test data. Based on the name of the ticket, I gather you are also seeing the issue we have here #15. There is an underlying issue with how gitlab counts tests. If that is part of what you are seeing it wouldn't hurt to upvote the gitlab issue https://gitlab.com/gitlab-org/gitlab/-/issues/31975 they have made some progress, but its been slow going. |
Yes, I'm seeing that. I'll go upvote that and ask my coworkers to do the same :) |
@hoppities MSTest is, in fact, behaving differently from xunit and nunit in this regard. This impacts all our loggers, so I will fix this in the core logger, under issue spekt/testlogger#20 |
Feat: update core logger, for #42
@hoppities I just published a fix for this to myget https://www.myget.org/feed/spekt/package/nuget/JunitXml.TestLogger/3.0.104 If you have time and can test it, let us know. I did run a test shown below. v3.0.98 <testsuites>
<testsuite name="TestProject1.dll" tests="17" skipped="2" failures="0" errors="0" time="0.007450599999999999" timestamp="2021-07-27T20:16:04" hostname="W0239867" id="0" package="TestProject1.dll">
<properties />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.TestMethod1" time="0.0035334" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.Some_Test_Method" time="0.0018167" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.Some_Test_Method" time="0.0000478" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.Some_Test_Method" time="0.0000041" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.Some_Async_Test_Method" time="0.0002927" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.Some_Async_Test_Method" time="0.0002446" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.Some_Async_Test_Method" time="0.0000081" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.IsPrime_ValuesLessThan2_ReturnFalse" time="0.0000852" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.IsPrime_ValuesLessThan2_ReturnFalse" time="0.0000344" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.IsPrime_ValuesLessThan2_ReturnFalse" time="0.0000021" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.IsPrime_ValuesLessThan2_ReturnFalse" time="0.0000012" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.TestAddDynamicDataMethod" time="0.0010952" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.TestAddDynamicDataMethod" time="0.0000311" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.TestAddDynamicDataMethod" time="0.0000033" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.TestAddDynamicDataMethod" time="0.0000047" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.DataDrivenTest" time="0.0001306">
<skipped />
</testcase>
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.DataDrivenTest" time="0.0001154">
<skipped />
</testcase>
<system-out></system-out>
<system-err></system-err>
</testsuite>
</testsuites> MyGet preview version 3.0.104 https://www.myget.org/feed/spekt/package/nuget/JunitXml.TestLogger/3.0.104 <testsuites>
<testsuite name="TestProject1.dll" tests="17" skipped="2" failures="0" errors="0" time="0.006163199999999999" timestamp="2021-07-27T20:22:11" hostname="W0239867" id="0" package="TestProject1.dll">
<properties />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.TestMethod1" time="0.0022678" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.Some_Test_Method" time="0.0016660" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.Some_Test_Method (True)" time="0.0000527" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.Some_Test_Method (False)" time="0.0000037" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.Some_Async_Test_Method" time="0.0002872" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.Some_Async_Test_Method (True)" time="0.0002428" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.Some_Async_Test_Method (False)" time="0.0000089" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.IsPrime_ValuesLessThan2_ReturnFalse" time="0.0000888" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.IsPrime_ValuesLessThan2_ReturnFalse (-1,a)" time="0.0000360" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.IsPrime_ValuesLessThan2_ReturnFalse (0,a)" time="0.0000027" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.IsPrime_ValuesLessThan2_ReturnFalse (1,acsdf)" time="0.0000012" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.TestAddDynamicDataMethod" time="0.0011878" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.TestAddDynamicDataMethod (1,1,2)" time="0.0000334" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.TestAddDynamicDataMethod (12,30,42)" time="0.0000039" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.TestAddDynamicDataMethod (14,1,15)" time="0.0000014" />
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.DataDrivenTest" time="0.0001472">
<skipped />
</testcase>
<testcase classname="TestProject1.UnitTest1" name="UnitTest1.DataDrivenTest" time="0.0001317">
<skipped />
</testcase>
<system-out></system-out>
<system-err></system-err>
</testsuite>
</testsuites> |
@codito Two things:
|
@Siphonophora We'll get this updated to the preview and let you know what happens. Thanks! Edit: We tested this, and it's now displaying tests correctly. We're seeing the parameterized tests show up now rather than being grouped by the test method name. |
@hoppities Thanks for the confirmation. I will keep this open till this is published on NuGet. |
Is there an update on when we might see this released? I've also been hit by this issue. |
@hoppities @BottlecapDave This is released in 3.0.110 |
Version="2.1.81"
Edit: I updated to the latest version and have the same issue.
This is my test step for GitLab CI, and I have tests set up with MSTest that use parameters.
The results, however, don't show the parameters that are passed in, so they get combined into one test by Gitlab.
Expected Result: The name of the testcase will include the parameter values like the GitLab CI Documentation states.
Do I have something misconfigured?
The text was updated successfully, but these errors were encountered: