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 ...
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 ...
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 ...
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 (...
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 ...
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 ...
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/
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(...
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:...
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 ...
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 ...
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.
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-...
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> ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
...
1
vote
Accepted
NUnit3: Log assert description when it fails
So, I ended up using FluentAssertion for assertions. FluentAssertion has this feature built-in.
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
nunit × 65selenium-webdriver × 40
c# × 35
automated-testing × 20
selenium2 × 7
unit-tests × 5
specflow × 4
browser-automation × 3
.net × 3
test-automation-framework × 2
xpath × 2
tools × 2
jenkins × 2
visualstudio × 2
bdd × 2
selenium-webdriver-c# × 2
exception × 2
grid × 2
team-city × 2
appium × 1
testcase × 1
selenium-ide × 1
qa-developer × 1
qa-role × 1
database × 1