Bug 18655 (vs-504783) - NUnit System.Reflection.TargetException When using Run All on two different TestFixtures
Summary: NUnit System.Reflection.TargetException When using Run All on two different T...
Status: RESOLVED NOT_REPRODUCIBLE
Alias: vs-504783
Product: Xamarin Studio
Classification: Desktop
Component: NUnit (show other bugs)
Version: unspecified
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 15.6
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-03-30 21:12 UTC by Drew Greenwell
Modified: 2018-01-10 14:11 UTC (History)
6 users (show)

Tags: vs-sync
Is this bug a regression?: ---
Last known good build:


Attachments
TestProject (9.46 KB, application/zip)
2014-04-02 05:47 UTC, Akhilesh kumar
Details
TestProject (16.70 KB, application/zip)
2014-04-03 05:26 UTC, Sadik Ali
Details
Working test project (302.65 KB, application/x-zip-compressed)
2017-12-20 12:45 UTC, Dmytro Ovcharov
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Drew Greenwell 2014-03-30 21:12:52 UTC
It appears that the NUnit project template has a bug with Run All on TestFixture pages.

I've got two classes with 3 async tests in them (Blah.ATests.ClassA, Blah.BTests.ClassB). 

If I choose Run Everything, all 6 process successfully. This also works if I choose Run All on the group of fixtures (aka 'iOSTests.exe > Run All')

If I click any individual test, it processes successfully.

If I go into ClassA and choose Run All, these process successfully. If I then go to ClassB and choose Run All I receive "System.Reflection.TargetException : Object of Type 'Blah.ATests.ClassA' doesn't match target type 'Blah.BTests.ClassB'

This error is always encountered on the second class that Run All is chosen on and will continue to fail until Clicking on any individual test in that class.
Comment 1 Akhilesh kumar 2014-04-02 05:47:29 UTC
Created attachment 6455 [details]
TestProject

I have checked this issue but unable to reproduce. I followed below mentioned steps:

1. Created NUnit library project
2. Added two Nunit test class with 3 async tests methods.
3. I run both test cases as mentioned in bug description but unable to reproduce.

Screen cast: http://screencast.com/t/8yfBhySqAMLG

Build Info:

=== Xamarin Studio ===
Version 4.2.3 (build 60)

=== Apple Developer Tools ===
Xcode 5.1 (5084)
Build 5B130a

=== Build Information ===
Release ID: 402030060
Git revision: 30c4afc300c2a39ec5300851357ce02e49dd217e
Xamarin addins: f8a9589b57c2bfab2ccd73c880e7ad81e3ecf044

=== Operating System ===
Mac OS X 10.9.3
Darwin Apples-iMac.local 13.2.0 Darwin Kernel Version 13.2.0
    Mon Mar 24 19:18:06 PDT 2014
    root:xnu-2422.100.10~2/RELEASE_X86_64 x86_64

I attached test project, Please let me know some addition steps code what I am missing to check this issue.
Comment 2 Drew Greenwell 2014-04-03 01:50:28 UTC
I apologize for being unclear. I am talking about the iOS NUnit project template. 

Here is a link that demos 
https://onedrive.live.com/redir?resid=E7FD3E77F92EF755!4868&authkey=!AMTeF_Gsgha3-Iw&ithint=video%2c.m4v
Comment 3 Sadik Ali 2014-04-03 05:24:31 UTC
I have checked this issue with iOS NUnit project. I followed below steps:

Steps:

1. Created iOS Nunit project.
2. Added two nunit test (A, B) with 3 async tests methods. 
3. Debug application.
4. Run all test case and noticed that 6 test cases passed.
5. run all three test case from "A" and noticed all three test passed.
6. After executing A, run "B" test case and noticed that all three test failed.

Screen cast: http://screencast.com/t/D0h1pHAg

Build Info:

=== Xamarin Studio ===
Version 4.2.3 (build 60)
Installation UUID: b1fc3b76-cf00-405e-a0a1-3839ac11fe6d
Runtime:
	Mono 3.2.7 ((no/40f92d5)
	GTK+ 2.24.23 theme: Raleigh
	GTK# (2.12.0.0)
	Package version: 302070000

=== Apple Developer Tools ===
Xcode 5.1 (5084)
Build 5B130a

=== Xamarin.Mac ===
Xamarin.Mac: 1.6.27

=== Xamarin.iOS ===
Version: 7.2.1.187 (Enterprise Edition)
Hash: 65e101d
Branch: 
Build date: 2014-04-02 01:54:18-0400

=== Build Information ===
Release ID: 402030060
Git revision: 30c4afc300c2a39ec5300851357ce02e49dd217e
Xamarin addins: f8a9589b57c2bfab2ccd73c880e7ad81e3ecf044

=== Operating System ===
Mac OS X 10.9.3
Darwin Apples-iMac.local 13.2.0 Darwin Kernel Version 13.2.0
    Mon Mar 24 19:18:06 PDT 2014
    root:xnu-2422.100.10~2/RELEASE_X86_64 x86_64
Comment 4 Sadik Ali 2014-04-03 05:26:26 UTC
Created attachment 6482 [details]
TestProject
Comment 6 Dmytro Ovcharov 2017-12-20 12:45:31 UTC
Created attachment 26031 [details]
Working test project

Everything works well for me. I attached new project with this issue, in this project bug not reproduced. (MD 7.4 build 815)