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: CONFIRMED
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: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2014-03-30 21:12 UTC by Drew Greenwell
Modified: 2017-10-05 14:10 UTC (History)
5 users (show)

See Also:
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

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

Note You need to log in before you can comment on or make changes to this bug.