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 ...
user avatar
4 votes

Is there any framework for UI automation testing for Unity3D?

Although I have never used them, it seems Unity released their own set of testing tools. See their introduction blogpost here. See their examples here. Get it from the Asset Store here. Contains ...
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 ...
user avatar
  • 4,440
3 votes

unit testing vs automation selenium resume value

Test automation is not high-end coding. You will not become wealthy doing either test automation or unit testing. Typically, unit-testing is not a separate job title. Experience with unit testing ...
user avatar
  • 23k
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 ...
user avatar
  • 1,663
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 (...
user avatar
  • 4,030
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 ...
user avatar
2 votes
Accepted

Is it possible to change the location of NUnits TestResult.xml

After running my tests in NUnit GUI I can manually go into (Tools->Save Result as XML) then a file explorer is popped allowing me to select where the XML file is saved.
user avatar
  • 1,190
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/
user avatar
2 votes
Accepted

Test recording with Selenium IDE vs manual programming test framework

I would always vote for hand-coding automated test over the use of Record and Playback. With programming test-cases its much easier to keep the tests DRY and if you think about maintainability of the ...
user avatar
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:...
user avatar
  • 501
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 ...
user avatar
  • 4,030
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 ...
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.
user avatar
  • 21
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 ...
user avatar
  • 3,212
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-...
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> ...
user avatar
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 ...
user avatar
  • 111
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 ...
user avatar
  • 1,030
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 ...
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. ...
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.
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 ...
user avatar
  • 4,030
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 ...
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 ...
user avatar
  • 30.8k
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 ...
user avatar
  • 1,030
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 ...
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 ...
user avatar
  • 977
1 vote

How to automate functionality of this complex web application?

I imagine your application to be somewhat analogous to an auto-insurance website. Page 1: Fill personal info Page 2: Fill vehicle info Page 3: Fill previous insurance history Page 4: Choose ...
user avatar
  • 319
1 vote

Inconsistent behaviour of Click() in Selenium

It is better to use ids than XPath because XPath changes as elements are moved around the page, making your tests more fragile. Can you see what the server is actually doing? Are you on the page you ...
user avatar

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