Comments (10)
I edited your description so your XML displays.
from nunit-v2-framework-driver.
I ran into the same problems and decided to look at the code.
I fixed it in my fork here but I am not too sure if it does what it should do because I'm not that familiar with all the States of NUnit.
Feedback would be appreciated!
from nunit-v2-framework-driver.
Looking at the filename in your last example, I gather these are xamarin tests. If that's the case, the NUnit engine (and hence the console runner) would not know how to run them. Can you clarify how you are running the tests?
from nunit-v2-framework-driver.
These are just standard tests (I'm working at Xamarin hence the namespace). For example:
[Test]
public void SimpleSuccessTest()
{
Console.WriteLine("SimpleSuccessTest BEFORE WAIT:: " + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));
Thread.Sleep(10000);
Console.WriteLine("SimpleSuccessTest AFTER WAIT:: " + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));
Assert.IsTrue(true);
}
I'm running the tests using the console:
nunit3-console "D:\\MS\\test-apps\\Xamarin.NUnit2.Tests\\bin\\Debug\\Xamarin.NUnit2.Tests.dll" --workers=0 --process=Single
from nunit-v2-framework-driver.
The results are interesting. The nunit2 format output is actually created from the nunit3 output. The nunit3 output is generated by the extension from the v2 object model. That suggests an error in creating the nunit3 output followed by a compensating error in reformatting to nunit2. Like a perfect storm of errors.
from nunit-v2-framework-driver.
Interesting - so the correct data must be in there somewhere :) Sounds like it's just not getting mapped correctly.
EDIT: Looking at the code in the v2 report writer - it's mapping based on the "result" attribute on each test case. I'll have a look and see how it's totting up the values in the console.
from nunit-v2-framework-driver.
Rather than checking the full ResultState
you should probably just look at the TestStatus
component. Its values map directly to the four attributes that need to be set.
from nunit-v2-framework-driver.
Thanks for the advice!
I didn't really find a way to get access to the TestStatus
component so I at least used the same logic to determine the state here. The only way I found was via TestContext.Result.State
. But I could not find a way to get a TestContext
.
But now that I know that there is a place to get this information from I would rather find a proper way.
Any advice?
from nunit-v2-framework-driver.
AH! Apologies... I forgot you are dealing with a V2 ResultState
, which is nothing but an enum. In NUnit 3, that becomes a class with Status, Label and Site properties.
I think you should handle them consistent with how we translate to NUnit 3 result states in the GetTranslatedResultState
method. I think you have done that with the sole exception of NotRunnable
, which NUnit 3 treats as failed.
It would also be cool if you could avoid recursing through all the children four times and do it just once, but I don't see that as essential to the PR.
from nunit-v2-framework-driver.
Fixed by PR #23
from nunit-v2-framework-driver.
Related Issues (20)
- How does this work? HOT 1
- Are v2 addins supported? HOT 2
- Remove nunit.v2.driver.addins? HOT 3
- Integrate creation of chocolatey package into the build script
- Is it possible to use this driver along with NUnit.ConsoleRunner? HOT 1
- Explicitness of tests is ignored in the presence of a filter with adding multiple negated categories HOT 10
- Use NUnit V2 Core package rather than hard coded 2.6.4 binaries HOT 18
- Exploring tests with filter returns all tests HOT 9
- V2 Driver does not support id filters HOT 11
- Create a level of support statement HOT 1
- Publish 'dev' builds on MyGet HOT 2
- Run integration tests on packages HOT 1
- Name and Fullname are the same in V3 XML format HOT 4
- Automate GitHub Release Process HOT 1
- Change default branch from master to main HOT 1
- Standardize build scripts for extensions HOT 2
- Automate the GitHub release process HOT 1
- V2 Framework Driver not picked up HOT 1
- Explicitness of tests is ignored in the presence of a negated filter HOT 13
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-v2-framework-driver.