Comments (3)
The reason for the recommendation to not change the testname is that the Visual Studio test explorer is driven by the testname. However, the default is {m}{a}
, so not sure why that should not work for you.
The problem: Now ShouldBeTrue_WhenIsLastFoundAtSameDayAsLimit is just duplicated, I cannot differentiate the tests and see them in NUnit.
I can't see what you're pointing at. I am possibly drowning in the image there. The first image looks like it still has template parameters, but the test code doesn't. I am confused. Can you point it out?
You are correct that the template parameters are for the testname, and not for the description. I am not sure if you want this to work in VS or in NCrunch.
from nunit.
I am possibly drowning in the image there. [...] I am confused. Can you point it out?
Oh I am sorry seems I indeed uploaded the wrong first image I am sorry, I've corrected it in the post.
So the actual problem seems to be that NCrunch always shows the description.
Also to see how NCrunch structures tests the code structure in my example is:
[TestOf(typeof(NotFoundWithinDuration))]
internal class NotFoundWithinDurationTest
{
// ...
public class ShouldDelete : NotFoundWithinDurationTest
{
// ...
// ....
public void
ShouldBeTrue_WhenLastFoundTimeIsInThePast(int numberOfDaysLastFound, int notFoundLimitInDays)
{
// ....
}
}
So that is why there is a plus in there etc, it uses the class names for it. That said, this does not matter, actually. NCrunch just always replaces the test name with the NUnit description if it has one. That is the root cause, leading to my tries here...
NCrunch v4.11.0.2 (in my case) with Visual Studio 2022 (17.8.4)
from nunit.
Have you raised an issue with NCrunch about this? It seems to me that the best place to fix this is in NCrunch, so that it doesnt use the description but the testname. In this case you should ignore the recommendation, given that you get a view in TestExplorer or NCrunch that you're happy with.
You could also look into moving the test data into a testcasesource, and then build up the description yourself with the correct parameters.
from nunit.
Related Issues (20)
- DefaultTimeout in .runsettings + TearDown method seems to break test output HOT 8
- TestCaseSource is ingored when different main namespace than the others HOT 3
- Add `DateTime`/`TimeSpan` support for inequality tolerance HOT 7
- Executing Tests in a dedicated thread with a proper Dispatcher HOT 2
- WpfMessagePumpStrategy - change from Dispatcher.Run to Dispatcher.PushFrame HOT 3
- PropertiesComparer should have default Depth limit, and compare breadth first, to reduce chances of StackOverflow HOT 6
- GitHub Actions fail on `master` for Windows and Linux builds HOT 6
- EqualTo() gives wrong result HOT 4
- Making `Constraint.Description` abstract breaks backwards compatibility HOT 5
- Question: Namespace Level Parallelization HOT 1
- Support for the new test runner HOT 3
- Can you please give us back `Assert.IsNotNull`, `Assert.IsFalse` etc.? HOT 9
- TimeoutAttribute causes context in TearDown to have incorrect info. HOT 4
- Patch-Release 4.0.2 HOT 5
- Implement API for composable and reusable test setups HOT 2
- Remove link in readme to the google discuss group, it's spammed.
- Generic TestCase and TestCaseParameter support
- NUnit publish plugin for Jenkins doesn't create attachments file HOT 3
- CollectionAssert (mis)handling of IList implementation HOT 8
- System.Net.Sockets.SocketException : An existing connection was forcibly closed by the remote host --SocketException HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nunit.