Questions tagged [nunit-2.5.9]

For issues relating creating and running unit tests using NUnit, version 2.5.9.

NUnit is an open source unit testing framework for Microsoft .NET written in C#. It serves the same purpose as JUnit does in the Java world, and is one of many in the xUnit family.

27 questions
9
votes
3 answers

Nunit - TestContext.CurrentContext.Test not working

I am using nunit 2.5.9.10348 and trying to extract the current test name in the TearDown event so I can assign a screengrab filename the test name however it is always null (see the attached image). The private _context variable does have the…
redsquare
  • 78,161
  • 20
  • 151
  • 159
4
votes
1 answer

Getting No Test Results after customising the build template for nunit tests in TFS 2010

I have followed the link for integrating nunit in TFS as part of TFS build. http://danderson00.blogspot.com/2011/10/running-nunit-tests-under-tfs-build.html using NUNITTFS It is running the nunit tests and if tests passed passing the build but it is…
sam
  • 4,594
  • 12
  • 61
  • 111
4
votes
2 answers

piece of code works in console application, but does not works inside nunit test

Simple console application open connection without any problems: static void Main(string[] args) { string connectionString = String.Format( @"Provider=OraOLEDB.Oracle;PLSQLRSet=1;Password={0};Persist Security…
Michael Pakhantsov
  • 24,855
  • 6
  • 60
  • 59
4
votes
1 answer

After upgrade, Unit Tests run timeout after an hour when they used to finish in 15 minutes

We upgraded our unit test project from .NET 3.5 to .NET 4.0. We also upgraded NUnit from 2.5.2 to 2.59. Now the unit tests time out after 50 minutes when they used to finish in about 15 minutes. These tests are run on JetBrains TeamCity 6.0.2 on our…
user661082
  • 41
  • 1
3
votes
1 answer

WebDriver test using Google Chrome hangs when executed via build process using TFS/NUnit

I'm having an issue with Selenium WebDriver, Microsoft Team Foundation Server, NUnit and Chrome/ChromeDriver. I'm hoping that maybe someone can offer some insights or point me in a direction to investigate. Right now I'm stymied on this issue. The…
2
votes
1 answer

NUnit 2.5.9 Problem

Good morning, afternoon, or night, I am trying to use NUnit 2.5.9 to run some unit tests contained in an assembly built with Visual Studio 2010 which targets .NET 2.0. However, I keep getting a System.BadImageFormatException exception everytime... I…
Miguel
  • 3,466
  • 8
  • 38
  • 67
2
votes
1 answer

NUnit Organization patterns

When analyzing the different options to organize unit tests in NUnit, I understood it as mainly of three types. 1.Test per Fixture 2.Class 3.Feature Can anyone share some good reference which will provide an insight on this? ReferenceI am confused,…
user1648142
2
votes
1 answer

Improving test syntax for immensely many test cases

I've got me a test method and a bunch of test cases as follows. [TestCase(1, 2)] [TestCase(3, 4)] [TestCase(5, 6)] public void Smack(int a, int b) { ... } I've hidden the bunch of cases in a region but it doesn't feel right. I've tried with the…
Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438
2
votes
1 answer

Ignoring NUnit test from the console using a wildcard

Are there a way that one can ignore unit tests when running NUnit from the command line based on a wildcard? Say for example I don't want to run any tests that end with IntegrationTest? In that case I would like to say ignore all tests containing…
André Vermeulen
  • 1,774
  • 4
  • 17
  • 26
2
votes
2 answers

Assert.Pass() throwing exception

I have a constructor as follows public class MyClass { public MyClass() { } } While writing test cases, i used Assert.Pass(). But it throws an exception of type ArguementNullException
user2435880
  • 71
  • 2
  • 8
1
vote
1 answer

How to get the thrown exception using Assert.That, à la Assert.Throws

I have some code which asserts an exception is thrown when a method is called, and then asserts various properties on the exception: var ex = Assert.Throws(() => MyMethod()); Assert.That(ex.Property1, Is.EqualTo("Some…
MPritchard
  • 7,031
  • 7
  • 28
  • 40
1
vote
1 answer

Can VS2010 generate NunitTest cases?

There is option of Create Unit Tests in VS2010. It creates a separate test project and uses MS test frame work. Is it possible for configure VS to use Nunit framework to create unit test cases?
Praful
  • 11
  • 1
1
vote
3 answers

NUnit 2.5.8 requries NUnit.Framework 2.5.5 to run. How can it be?! And what for?

I'm getting a dumb exception on nunit.exe launch attempt: System.IO.FileNotFoundException: Could not load file or assembly 'nunit.framework, Version=2.5.5.10112, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies. The…
abatishchev
  • 98,240
  • 88
  • 296
  • 433
1
vote
1 answer

VS2015 : NUnit : Could not copy 'source dll localtion' to 'destination dll localtion'. Exceeded retry count of 10. Failed

I'm working on web API project. I have written unit tests and i am using Nunit to run these tests. I encountered this strange error. I opened Nunit.exe and under Project > Add Assembly i specify my dll which has unit tests. I click Run and tests…
Nameless
  • 1,026
  • 15
  • 28
1
vote
1 answer

What is the difference between nunit3 xml format and nunit2 xml format?

On NUnit 3 release a new xml format of tests report appeared. It's nunit3 format. There are a little information about it https://github.com/nunit/docs/wiki/Console-Command-Line. It's told there: The --result option may use any of the following…
Denis Koreyba
  • 3,144
  • 1
  • 31
  • 49
1
2