Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [nunit]

NUnit is a unit-testing framework for all .Net languages

0
votes
1answer
36 views

Selenium, data driven testing using NUnit and SQL queries.

I am developing a Selenium Test Automation Framework for the purpose of testing multiple websites. I have currently set up the Framework in Visual Studio using C# and implementing the Page Object ...
0
votes
0answers
19 views

Xamarin UITest app.Snapshot started saving images to the wrong location

In the middle of developing some new tests my scripts began to fail when copying snapshots. I've been using FileInfo info =App.Screenshot("title"); info.MoveTo("New\Location"); which seems to be ...
0
votes
0answers
16 views

Should integration tests redo unit tests that use mocking?

While writing unit tests I will check only one class at a time. If I need to use additional classes then I will use mocking to make sure that test is independent. Later I want to write integration ...
0
votes
1answer
112 views

How to run multiple test cases sequentially in NUnit Console Runner

I'm trying to run nunit3 exe through Jenkins but after building the project, it runs all available test cases parallely. They should run sequetially. I tried where clause in nunit but how it will ...
0
votes
0answers
210 views

Taking screenshot and name it like failed test using selenium WebDriver

This code takes a screenshot when test fail, but name it like my class. How to named screenshot like failed test? Example: public void ClickMyAccount() fail and screenshot must be named ClickMyAccount....
0
votes
1answer
108 views

WebDriver Exception was unhandled by user code C# NUnit Selenium

Till yeaterday i.e. 17th July 2018 I was able to successfully run my testcases. But now I'm getting below error: A exception with a null response was thrown sending an HTTP request to the remote ...
0
votes
0answers
33 views

Relative path to file in NUnit test project

This is my code which testing upload and finds a path to file, located in my project’s folder. The purpose is code to be run on any machine. Project is .NET Core: IWebDriver driver = new ChromeDriver(...
0
votes
0answers
139 views

I can't instantiate ExtentReports class

I worked with ExtentReports with selenium in visual studio C #, this is My BasicReport Class: using NUnit.Framework; using RelevantCodes.ExtentReports; using System; using System.Collections....
0
votes
2answers
169 views

If an element id is present but still we are getting element not found exception, its reason? how to handle it [closed]

If an element id is present but still we are getting element not found exception, as its reason? how to handle it.
1
vote
1answer
148 views

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

I am trying to run my Automated test cases from the command line. My tests were written in C# - NUnit-Selenium-Webdriver. I opened my solution in file explorer then navigated to Bin--> Debug, but I ...
1
vote
1answer
63 views

I am trying to validate the following in page: Unit testing text and existence of Test Automation Interface Model picture [closed]

I am using the C# selenium, Specflow and Nunit3 for performing above task. I am confused that how to validate the page. Later on, following task already i have done. Moreover, it Search for the link ...
0
votes
1answer
62 views

Selenium pytest vs nunit

I'from background of automated testing with tools like Testcomplete, QTP, JMeter and soupUI. Recently there was a need automation of web-application for institute I work. I started with Selenium-...
2
votes
2answers
174 views

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

We are starting to automate our manual regression suites using Selenium Webdriver and NUnit. The tests we will be automating are quite detailed in terms of steps and expected results however I was ...
0
votes
0answers
62 views

Strange nesting in Test Explorer Specflow + VS2017

I updated VS 2015 to VS 2017 and I have latest versions of Specflow and nUnit. I want to group my tests by the project. At VS 2015 all worked fine. I saw only tests under project, In VS 2017 I see ...
1
vote
1answer
412 views

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

I have medium level experience on unit testing and now I'm learning about NUnit. As far as I can see, a NUnit test passes by default if you don't call Assert.Fail method. In my test case, I want it ...
0
votes
1answer
325 views

BDD specflow Error: "Ambiguous Step Definition Found For Step

I am getting this error: "Ambiguous Step Definition Found For Step...." on running my Specflow Test. The code is for the client that I am working for, thus I am not permitted to provide code sample. ...
6
votes
2answers
380 views

How to make run only failed test cases in NUnit

Can anyone please tell me how to run only failed test cases using NUnit.
1
vote
0answers
113 views

How to refer custom jquery and bootstrap path in karma-html-detailed-reporter's reporter.js file?

I am new to TDD. Currently I had running more than 2000 test cases parallel with chrome headless browser using concurrently-npm package .The test case are all working fine. If any of the test cases ...
1
vote
1answer
41 views

Getting error while adding Test annotation in project using NUnit

I encountered with some errors when tried to add the NUnit Annotation to my code as shown in below image. I have done some error research from Here also following instructions from here too but no ...
2
votes
2answers
2k views

Error: System.NullReferenceException error in Selenium with NUnit

I'm getting following error at verification stage: "An unhandled exception of type 'System.NullReferenceException' occurred in nunit.framework.dll Additional information: Object reference not set to ...
6
votes
1answer
254 views

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

I have created a ProdIgnoreAttribute which extends from IgnoreAttribute. And I have assigned this attribute to certain tests which I want to run in DEV/QA but not in PROD. ApplyToTest(Test test) ...
1
vote
1answer
735 views

NUnit3: Log assert description when it fails

On test failure Nunit will only show evaluated expected and actual conditions. There is no way to tell which Assert failed if you have multiple asserts Expected: True But was: False I know that we ...
0
votes
1answer
820 views

Functional Difference between NUnit and MSTest in VS

We are using VS Community 2015 and have the choice of developing under the MSTest or the NUnit framework. We are building a testing framework using Legitest (unit, integration, system, etc) for ...
2
votes
1answer
458 views

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

NUnit3 Console runner saves test results in xml at the end of the test run. But in my case I want to save the partial results on each test failure, so that in case console runner crashes or is stopped,...
0
votes
1answer
1k views

How to run a nunit test using cmd

I created a simple test suite using nunit by opening a new .net console application project. In the visual studio at Test explorer I can see my test methods. Now I want to run them using CMD, i.e. at ...
0
votes
1answer
234 views

TestCase Filter in TFSBuild

I am using Nunit V2.6.4 and NunitTestAdapter v2.0 to run selenium tests in visual studio 2015. We also have a build definition set up to run these tests nightly(on selenium grid)in chrome browser. I ...
2
votes
1answer
2k views

Kill browser sessions when driver is instantiated on each test

I am developing a testing framework for an application at my work and am running in to an issue. I use Selenium 3.0.1, NUnit 3.5.0, NUnit3TestAdapter 3.6.0, and a Selenium Grid instance to run my ...
2
votes
1answer
480 views

Selenium Grid sending commands to the wrong node

I am working on setting up a distributed testing environment and am running in to an interesting issue. When running tests in parallel the tests seem to get routed to the correct nodes and execute to ...
0
votes
1answer
321 views

webdriver doesnt Click (sometimes) even after waiting for ElementToBeClickable

Example not exact code: WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(45)); wait.Until(ExpectedConditions.ElementIsVisible(By.Id(Element))); wait.Until(ExpectedConditions....
1
vote
2answers
386 views

unit testing vs automation selenium resume value [closed]

I started working in automation development with selenium and am told it is a hot field and can earn some high-end coding salaries. We recently hired a new manager who once hired immediately took us ...
0
votes
3answers
601 views

How to automate functionality of this complex web application?

I am tasked with creating regression suite from scratch for this huge, confusing mess of a software. General idea is like this: User presses "Create this thing", first step of thing creation is ...
0
votes
2answers
1k views

Inconsistent behaviour of Click() in Selenium

I'm working on a Product automation(Web CMS), where element.Click() shows the inconsistent behaviour. Basically we are using, Selenium + Nunit GUI(unit testing framework) - To run the test cases from ...
2
votes
1answer
630 views

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

I am running my tests in Selenium using NUnit and Jenkins and it takes more then 2 hours to run all tests. I want to see the progress of the tests for monitoring if everything is OK like a team city ...
2
votes
2answers
4k views

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

I have written a number of test cases in C# for UI which uses Selenium Webdriver (I am new to Selenium). I would like to run a particular test case out of N number of test cases through command ...
5
votes
3answers
2k views

Can NUnit be used for Functional and Regression testing?

Now, here the confusion starts. I was creating some test cases using Selenium WebDriver with C# and thought of using a testing framework. My task is to create functional test cases which can later be ...
1
vote
1answer
1k views

Handling multiple Iframes with same name

I am trying to navigate on a web browser that has multiple iframes that are all tagged with the id of "InlineDialog_Iframe". When I try to switch to the window I get a stale reference exception, which ...
2
votes
1answer
523 views

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

When running tests with the NUnit GUI application, is it possible to change the location of where NUnit creates the TestResult.xml file after the test has completed? It is usually created in the same ...
3
votes
2answers
3k views

Test recording with Selenium IDE vs manual programming test framework

I'm just beginner in this field. I have already created simple tests using Selenium in .NET environment together with NUnit. I also hard coded the same or similar tests for my framework. My question ...
7
votes
3answers
7k views

Is there any framework for UI automation testing for Unity3D?

Does anyone know any framework that is compatible/integrated with Unity3D? I'm interested in Unit, Integrated and UI testing.
1
vote
1answer
2k views

Creating Test Suite dynamically in NUnit

I would like to create a test suite using NUnit. In java, I could use the name of the classes and do something like this: TestSuite suite = new TestSuite(); suite.addTest(new JUnit4TestAdapter(Class....
-2
votes
2answers
626 views

What Assert.AreEqual(true, true); does? [closed]

Can any one explain Assert.AreEqual(true, true); with proper example and explanation?
1
vote
1answer
994 views

Visual Studio 2012 + NUnit unit test integration

I am having a problem with integration my NUnit test integration. I have installed the test adapter for NUnit and also made sure that the extension is enabled, but no test are shown in the test ...
1
vote
3answers
655 views

Nunit not working

I'm new to NUnit and I just download it and installed .But while opening project i got exception as " Load Failed" System.IO.FileNotFoundException... Why am I getting this exception? Please help ...
6
votes
3answers
2k views

What is the best way to handle minor intermittent automation failures during cross browser testing?

I run Web Driver (.Net version) with SpecFlow as my test driver on some fairly general Cross - Browser scenarios so I often am rerunning tests as I add new ones, or clean up old automation. On ...
3
votes
1answer
1k views

Deploying Selenium RC tests with Teamcity

I'm looking at setting up my Selenium tests in a QA environment which will run with a Teamcity build each time. This seems to be the best resource I've come across so far where someone has gone ...
3
votes
2answers
7k views

Selenium 2.0 WebDriver: Clearing Session Data

Is there a way to clear out session data for a driver instance in WebDriver? My code is written in C# (and NUnit), but I'm not picky on the language for the answer.
8
votes
2answers
4k views

NUnit: Global error method/event for handling exceptions

I'm looking for a way to catch exceptions globally in my NUnit project class library. So if one of my unit tests throws an exception, I can catch it in one spot. I don't want to surround each of my ...
10
votes
5answers
28k views

How to start a Selenium2 WebDriver window in background?

I have a series of Selenium2 test cases in C#/NUnit that are run sequentially. Each test case runs in a new instance of the WebDriver (and this is necessary) - which means that each time a new test ...
3
votes
1answer
273 views

Not displaying nunit tests in visual studion after NUnit integration in Visual Studio

I have downloaded the vISUAL Nunit 2010 and also edited the .vbproj file guid. But still Visual Studio is not displaying nunit tests. Any idea what I am missing here.
3
votes
3answers
1k views

Is there an Interface to Run Selenium 2.0 WebDriver Test Cases other than NUnit?

Is it possible to wrap around Selenium 2.0 WebDriver Test Cases with anything other than NUnit for C# code? Or perhaps NUnit has a nice application to do this with? If not, how can I wrap around the ...