Skip to main content

Questions tagged [nunit]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
1k views

How to generate report using extent reports in Page Object Model in C#

I have created a POM framework using NUnit in C#. I have created Reporting.cs file which creates reports for the test in that class. How I can generate reports for all tests in different classes ...
0 votes
2 answers
749 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
1 answer
2k views

Xpath to an anchor returning error: unable to locate element

I am new to automated testing. I am using C#, Selenium and Chrome 99 with the correct driver. I am trying to get to an anchor tag on the page. Here is my code that is not working, driver.Url = "...
0 votes
2 answers
353 views

Testing multiple browser configurations via Selenium WebDriver

When covering cross-browser testing using Selenium WebDriver, how do you provide the browser and version information to the tool (e.g. BrowserStack, Sauce Labs)? For example, you're wanting to execute ...
0 votes
2 answers
2k views

Methods to setup parallel test execution in NUnit with Selenium WebDriver C#

For true parallel execution of Selenium tests in NUnit, does the setup of the webdriver object need to be within the test method itself? Or is there a better way? Previously, for parallel execution ...
4 votes
1 answer
2k 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 ...
2 votes
1 answer
5k views

BDD specflow Error: "Ambiguous Step Definition Found For Step

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

Can tests written in Visual Studio / Selenium / Nunit be made available to non technical QA folks?

We have a few QA folks that do not code. I am writing test cases in VS and was asked if there is a way to make them available to them. Maybe an .exe that lists all the test scenarios and they can ...
6 votes
2 answers
3k 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) ...
0 votes
1 answer
2k 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 ...
7 votes
3 answers
3k 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 ...
0 votes
1 answer
64 views

Running test suite setup once in every node of Selenium Grid

I am testing an application which would require to configure it into dev mode before test execution. (set the application to point into dev backend instead of live) The configuration itself is ...
2 votes
1 answer
49 views

Re-using a system test (in NUnit3)

Typically, (unit) tests should be independent and work on their own, however, in system testing we face different requirements. For example, I am implementing a test for a setup. Standard ...
1 vote
1 answer
219 views

NUnit Assert.This(obj, method) for C# - where to find list of evaluation methods?

I'm an old embedded coder, new to NUnit and VS C#. I'm trying to get used to the Assert.That(obj,[EvaluationMethod]) methodology that NUnit 3.x is promoting. I'm slowly getting up to speed, but was ...
1 vote
1 answer
2k 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
0 answers
428 views

How do I make a custom logger for Fluent Assertions?

I'm using NUnit and Fluent Assertions for testing. I'd like to write a custom logger for my test steps which shows which steps have passed and the step (if any) that failed. It looks like someone has ...
1 vote
0 answers
333 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 run more than 2000 test cases parallel with chrome headless browser using concurrently-npm package. All the test cases are working fine. If any of the test cases get ...
0 votes
1 answer
368 views

Once an exception is thrown, it shouldn't ideally go to a TearDown/ aftertest

I'm using the NUnit framework. If my test-case failed with an exception like a timeout or any other exceptions. After the test it should go to [Teardown] but it is not going struck there abort the ...
1 vote
1 answer
2k views

Unable to load MS edge chromium with Selenium

I'm trying to load the msedge chromium. encountering error. Steps to recreate: Installed mschromium Beta and Dev versions. Installed the Nuget package "Install-Package Selenium.WebDriver -Version 4....
0 votes
1 answer
41 views

Testing my own stack class

Im creating a very simple stack class to implement my learnings on TDD. I have created a test that will create a stack and check the length of it. This is my test class: using NUnit.Framework; ...
0 votes
4 answers
97 views

Automated Way To Prove Robustness Of Tests

I have an automated test suite of NUnit Selenium tests written in C#. I am trying to test for my test suite's robustness by running my entire suite say 50 times and viewing an amalgamation of the ...
1 vote
3 answers
3k 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 ...
2 votes
2 answers
1k views

Setup of Test automation framework from scratch using NUnit and Specflow and RestSharp and selenium with Visual Studio 2017 C#

We have so many API's(5 to 8 API calls - Mostly REST based and 1 or 2 in SOAP based) and Oracle DB. We do not have any WEB UI. No UI automation.Only middle tier and backend automation. For automation ...
6 votes
2 answers
3k 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
1 answer
1k views

Teardown of Multiple Threaded Tests with Selenium

I'm trying to run multiple test cases with Nunit in C# in which every test needs its own Selenium Chrome Driver. Before it was threaded, I handled the chrome driver with [Setup] and [Teardown] like ...
2 votes
1 answer
2k views

Retry in nunit not working when test times out

I am using Timeout attribute for nunit test case as below: [Test, TestCaseSource("TestCases"), Retry(2), Timeout(10000) public void test(){ // Some code that runs for more than 10 seconds } I ...
1 vote
1 answer
677 views

Closing Driver after all test are runned

I'm using Nunit + .NetCore 2.2 in my project and I need to close the browser only after running all the tests and not after each test class. Currently the tests are closing the browser after each test ...
1 vote
1 answer
142 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 and here also following instructions from here too ...
0 votes
1 answer
5k 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
1 answer
1k views

How can I use Sequential attribute with TestCaseSource in nUnit?

I'm new to unit testing and nUnit in general and I'm not sure what I'm trying to do is possible or if I'm using the right syntax (in C#). I want to pass for a test a collection of IEnumerable using ...
1 vote
3 answers
754 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 ...
7 votes
4 answers
10k 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
1 answer
4k 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 ...
2 votes
2 answers
320 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
1 answer
512 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
2 answers
2k 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
1 answer
269 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
1 answer
301 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
1 answer
2k 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,...
2 votes
2 answers
7k 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 ...
11 votes
5 answers
31k 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
1 answer
1k 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 ...
0 votes
1 answer
607 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 ...
0 votes
2 answers
2k 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
1 answer
2k 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
1 answer
8k 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
1 answer
1k 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 ...
1 vote
1 answer
1k 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 ...
0 votes
1 answer
1k 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....
0 votes
3 answers
1k 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 ...