NunitLite - Tests work individually but fail when RunAll is used

When using Nunitlite, test run individually but fail when RunAll is used.

For example: I have three test and I click on RunAll. Error comes back:

System.Reflection.TargetException: Object of type 'namespace1' dosen't match target type 'namespace2.Test'
Teardown : System.Reflection.TargetException: Object of type 'namespace1' dosen't match target type 'namespace2.Test'

Its getting confused with tests in a different namespace.

But then, if i click on the first test individual. It runs. Then I click on RunAll and they all work.

So, somehow the test running cant figure out the namespace the tests are in. But if you run one test in that group, (a static variable??) gets initialized and things work..

Posts

  • mbalsam_nycmbalsam_nyc USMember ✭✭

    bump

  • MathewRenyMathewReny USMember
    edited June 2014

    I'm getting the same exact problem. In my test app, "namespace1" is the first fixture in the list and "namespace2" is the namespace of the fixture being run.

  • mbalsam_nycmbalsam_nyc USMember ✭✭

    I've not fixed it, but if seems to be effected by the use of static variables used in the test cases..

Sign In or Register to comment.