Hot answers tagged

5 votes

Can NUnit be used for Functional and Regression testing?

Yes, you can use NUnit for functional testing. But still it is a unit-testing framework. No, you are not creating unit-tests by using a unit-testing framework to write functional tests. A unit-test is ...
Niels van Reijmersdal's user avatar
3 votes
Accepted

Getting error while adding Test annotation in project using NUnit

The Test annotation goes outside of the test method. You've placed it inside. Try this: [Test] void myTestMethod() { ... your test code here ... } Also, the Test annotation may not work on a ...
Dale Emery's user avatar
  • 4,485
3 votes

NUnit3: Log assert description when it fails

Personally I would spit out an output log as well as the general test value. Then you can see the failure and go check the log. You can clear the log each time you run the test. Remember it's a ...
mutt's user avatar
  • 1,693
3 votes
Accepted

Functional Difference between NUnit and MSTest in VS

Check out the answer to this question over at StackOverflow. (From the accepted answer) NUnit has few advantages over MS-Test Suite attribute - can aggregate tests and execute them separately (...
kirbycope's user avatar
  • 4,080
3 votes

Is there any framework for UI automation testing for Unity3D?

I recently did my master's thesis on automated system testing of programs made with Unity. In my thesis, I evaluated some of the currently used methods and what tools can be used. I also proposed my ...
Madis Taimre's user avatar
2 votes
Accepted

Can NUnit be used for Functional and Regression testing?

Is NUnit only a Unit testing framework? NUint is a .Net port (commonly used with Visual Studio) of JUnit (which is commonly used with Eclipse). So it's different than the standard 'unit tests' in a ...
kirbycope's user avatar
  • 4,080
2 votes

Test recording with Selenium IDE vs manual programming test framework

There is another tool to record page object model. below is the link: http://seleniumrecorder.blogspot.com/
varinder kumar's user avatar
2 votes
Accepted

How to see ongoing progress of my Selenium tests run in NUnit on Jenkins?

You can see the test progress in logs, you just need to add Execution details in your SetUp and TearDown like this: private readonly Stopwatch _stopwatch = new Stopwatch(); [SetUp] public void SetUp(...
Megha's user avatar
  • 166
2 votes

Execute a particular test using command prompt and Selenium, NUnit, Test cases written in C#

You can run a single test from the command line using the nunit-console. Open command-prompt and change directory to the NUnit bin installation folder. To run a single test use: nunit-console /run:...
Cosmin's user avatar
  • 501
2 votes
Accepted

Selenium Grid sending commands to the wrong node

It appears as though you are using a static instance for the close operation. I am not certain of the inner workings of your driver class but it is possible that this is causing the issue. I would ...
Paul Muir's user avatar
  • 3,272
2 votes

How to make run only failed test cases in NUnit

NUnit does not provide this feature. There is no feature to re-run only the failed test cases. Would can do is start only a couple of tests from the command-line by their name: --test=NAMES ...
Niels van Reijmersdal's user avatar
2 votes

NUnit3: Log assert description when it fails

use Assert.That(User.HasProducts, Is.True, "I am failed because User.HasProducts not true") You will see the message I am failed because User.HasProducts not true if the test failed on this assert.
Anna's user avatar
  • 21
2 votes

Retry in nunit not working when test times out

Retry only works on Assertion failures. You will have to write a custom Retry attribute that retries on Errors as well. Here is one way of doing it: https://stackoverflow.com/questions/46319701/nunit-...
H.D.'s user avatar
  • 247
2 votes
Accepted

Teardown of Multiple Threaded Tests with Selenium

You can try using the ThreadLocal Class, so each running thread would be assigned it's own webdriver instance. See pseudocode to get the idea: private static readonly ThreadLocal<IWebDriver> ...
501NotImplemented's user avatar
1 vote

Dll file is missing in my Debug folder (C#-Selenium)

You have to use NUnit.ConsoleRunner, you can find it in your solution packages folder or in the directory if you have already installed in separetly. First find the NUnit.ConsoleRunner, hold shift ...
Nikolay Barakov's user avatar
1 vote
Accepted

Benefits of BDD tools such as SpecFlow for tech debt in automation

In your case I don't think BDD (or its cousin TDD) is necessarily the right tool for what you are doing. Rather than developing application code based on desired behavior as captured in tests, it ...
Michael Durrant's user avatar
1 vote

How to fail NUnit test by default (I want to call Assert.Pass when it should pass)

Editing my original answer as I incorrectly stated that test would continue after Assert.Pass() call. http://nunit.org/docs/2.5/utilityAsserts.html Your specific example could be re-written like ...
evets17's user avatar
  • 106
1 vote

BDD specflow Error: "Ambiguous Step Definition Found For Step

Specflow generates nunit tests from the gerkhin feature files by generating a code behind file. This process is often quite sketchy and sometimes creates broken files. If you delete the .cs file with ...
Amias's user avatar
  • 1,202
1 vote

Error: System.NullReferenceException error in Selenium with NUnit

If you're getting the error on the assertion line, it's exactly what the message tells you - you're getting a null reference. Often this is due to the fact that your FindElement() fails, so then when ...
ernie's user avatar
  • 1,040
1 vote

Error: System.NullReferenceException error in Selenium with NUnit

The following should work. I've used the class name for the login button instead of using XPath (seems more appropriate here) + always use explicit waits never Thread.sleep! //Instantiate Firefox ...
NotInventedHere's user avatar
1 vote

How to ignore a test in C# when CurrentEnv is Prod

I would go another way. Set test categories for the given tests (e.g. "QA", "DEV", "PROD") Create a CI job for NUnit test execution for given category on a specific environment. 1 category - 1 job. ...
501NotImplemented's user avatar
1 vote
Accepted

NUnit3: Log assert description when it fails

So, I ended up using FluentAssertion for assertions. FluentAssertion has this feature built-in.
H.D.'s user avatar
  • 247
1 vote
Accepted

Nunit3: how to save the test results while tests are running

You could use NUnit3's TestContext that creates a TextWriter and save the output where ever you want. I use Console.WriteLine() and read the Output in Visual Studio's Test Explorer (requires you have ...
kirbycope's user avatar
  • 4,080
1 vote

How to run a NUnit test using cmd

You need to install the NUnit with the installer this installs the executables in your PATH. Just using the NuGet packages won't work. How to run from the command line is documentation in the NUnit ...
Niels van Reijmersdal's user avatar
1 vote

TestCase Filter in TFSBuild

A quick search gave what is probably the answer: For NUnit, you need to use Category instead of TestCategory. You may also need to remove spaces - the examples online suggest that your TestCaseFilter ...
Kate Paulk's user avatar
  • 31.5k
1 vote
Accepted

Kill browser sessions when driver is instantiated on each test

Simplest solution is a try-finally block . At a higher level, you could write a decorator/annotation for this. Here's an SO answer in Java, and here's a blog post for C# showing how that might ...
ernie's user avatar
  • 1,040
1 vote

unit testing vs automation selenium resume value

That was what I had previously believed also (because I've done dev) until my current position whereas the director is my source for this who actually sees the numbers. Although, maybe its more ...
disq0's user avatar
  • 111
1 vote

How to automate functionality of this complex web application?

Yes, your app is designed in a way it is really hard to test by a E2E script. Let's hope you started by having plenty of unit tests. Use page object to provide services to your test. Then, start with ...
Peter M. - stands for Monica's user avatar
1 vote

How to automate functionality of this complex web application?

Preparation and planning is the key. "If I had eight hours to chop down a tree, I'd spend the first six of them sharpening my axe." Try to create a quick map/sketch of the workflow Define small ...
lauda's user avatar
  • 977

Only top scored, non community-wiki answers of a minimum length are eligible