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

[Feature request] Add support for NUnit test properties #87

Open
elv1s42 opened this issue Oct 25, 2023 · 0 comments
Open

[Feature request] Add support for NUnit test properties #87

elv1s42 opened this issue Oct 25, 2023 · 0 comments

Comments

@elv1s42
Copy link
Contributor

elv1s42 commented Oct 25, 2023

When using NUnit, we can create custom properties for different purposes:

[Test]
[Description("This test tests awesome features")]
[Property("Priority", "High")]
[Property("Severity", "High")]
[Property("Subsystem", "User dashboard")]
public async Task TestDashboardLogin()
{
  // test
}

These properties are saved in the NUnit .xml result file:

<test-case id="0-2815" name="TestDashboardLogin" fullname="Tests.Dashboard.TestDashboardLogin" methodname="TestDashboardLogin" classname="Tests.Dashboard" runstate="Runnable" seed="949643898" result="Passed" start-time="2023-10-24T12:09:06.3087925Z" end-time="2023-10-24T12:09:12.0604303Z" duration="5.751055" asserts="0">
  <properties>
    <property name="Description" value="This test tests awesome features"/>
    <property name="Priority" value="High"/>
    <property name="Severity" value="High"/>
    <property name="Subsystem" value="User dashboard"/>
  </properties>
  <output>
  </output>
  <attachments>
  </attachments>
</test-case>

I think it will make sense to include these properties as test metadata to have them in TeamCity. They will be visible in TeamCity UI, and they will be accessible via TeamCity API:

<metadata count="15">
  <typedValues name="Description" type="text" value="This test tests awesome features"/>
  <typedValues name="Priority" type="text" value="High"/>
  <typedValues name="Severity" type="text" value="High"/>
  <typedValues name="Subsystem" type="text" value="User dashboard"/>
</metadata>
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