Generating html from Nunit xml test results
I am generating the xml output of nunit tests using: nunit-console /xml:console-test.xml nunit.tests.dll How can I create a table formatted report using the xml. Is there any tool for that? ...
I am generating the xml output of nunit tests using: nunit-console /xml:console-test.xml nunit.tests.dll How can I create a table formatted report using the xml. Is there any tool for that? ...
Hi, I'd like to Assert that an exception is being thrown and then check some of the properties of the thrown exception. I was under the impression that I could do something like the following: ICommand command = CreateCommandObj(); Assert.That( () => command.DoWork(), Throws.TypeOf<ArgumentException>(), ...
Hi, I am testing a web app where a file is to be renamed as follows 1)first click on the files name 2) this will make a textbox appear 3) I type the new name in textbox 4) I have to click outside the textbox so that the new name gets set. or 4) Press enter key The problem is in step 4. I've tried to get it to click at several places in...
I have a unit test (nUnit). Many layers down the call stack a method will fail if it is running via a unit test. Ideally you would use something like mocking to setup the object that this method is depending on but this is 3rd party code and I can't do that without a lot of work. I don't want setup nUnit specific methods - there are to...
Hello :) I'd like to get the currently executing NUnit test in a helper method I'm using. We're actually using NUnit for integration tests here -- not unit tests. When a test finishes, we'd like to have the test clean up some log files when it's done. Currently, I've hacked around this using the StackFrame class: class TestHelper { ...
There are three ways to organize unit tests: Text per Fixture, Class or Feature. But NUnit attribute for TestClass is called TestFixture. Are there any historical reasons for that? ...
Hi, I am trying to simulate a keypress for enter key in selenium using the below statement: Selenium.KeyPressNative("10"); It works on my colleague's PC, but, doesn't seem to be executed in my machine. It appears that selenium skips this command. Please help. Thanks and Regards, Vamyip ...
Hi, I've been using selenium-rc for c# since past 10 days, and I'm getting a strange problem with it. Whatever scripts I write, won't work on my colleagues PC, and vice-versa. Also, sometimes, the code which runs well in one test case, seems to fail in another test case, while both are being run on the same computer. e.g. 1. when I wri...
Hi, I am testing a web app where i delete an item from a list. Upon clicking on delete, the app asks for confirmation. Selenium IDE detects it as a confirmation box. When I run the code thro' the RC (C#), it even catches the confirmation-box, executes the click of delete button on that confirmation box, but, the confirmation box is neve...
Hey everyone, I'm writing some unit tests for some controller methods in my project and am wondering whether to test against the controller class itself or an interface of that controller. Should I be creating an interface for each controller and run my unit tests against that? ...
I wrote my own NUnit test runner in VB .Net based on some of the following links: Implement your own NUnit TestRunner - Part 1 Stack Overflow - How to run NUnit programmatically Stack Overflow - Running NUnit Tests In a C# Console App My code is a custom MSBuild task running in a Web Application. I have included my code below. It i...
Where should I place code that should only run once (and not once per class)? An example for this would be a statement that initializes the DB connection string. And I only need to run that once and I don't want to place a new method within each "TestFixture" class just to do that. ...
Is it somehow possible to pass values to NUnit tests via command line? My tests use a certain URL. I have different instances of my code at different URLs and would like to specify the URL via command line. App.config is not an option, because I want to run the tests for different URLs via a batch file. ...
I have a index.html file which includes scripts.js in scripts.js: function Add(arg1, arg2) { if(typeof(arg1) == 'string') arg1 = parseInt(arg1); if(typeof(arg2) == 'string') arg2 = parseInt(arg2); return arg1 + arg2; } in my C# code: [Test] public void Tescik() { Assert.AreEqual(sel.GetEval(@"this.browserbot.getUserWindow...
I started using FsUnit to test F# code. It makes it possible to express assertion in F# style, for example: [<Test>] member this.``Portugal voted for 23 countries in 2001 Eurovision contest``() = this.totalVotes |> getYearVotesFromCountry "Portugal" 2001 |> Seq.length |> should equal 23 Note "sould equal 23" that I ge...
Hi does any one know how to configure specflow to output step definitions in a nunit output window? Thanks! ...
Maybe you know the simplest way of unit testing javascript functions (not UI like Selenium or WatiN) which can be automated (I prefer using NUnit, eventually NAnt) ? I need to introduce an automated unit test for javascript functions on CruiseControl.NET (so with NUnit and NAnt) - but maybe there is other way ? Thanks, Dawid ...
I'm working on a web application that is built over Sitecore CMS. I was wondering if we could unit test for example a method that takes some data from Sitecore makes some processing with it and spits out a result. I would like to test all the logic within the method via a unit test. I pretty confused after searching the internet wide an...
Is there something similar to CollectionAssert.AreEquivalent() that works with nested collections? The following code... CollectionAssert.AreEquivalent ( new Dictionary<int, Dictionary<int, string>> { { 1, new Dictionary < int, string > { { 10, "foo" }, { 11, "bar" }, { 12, "spam" } } }, { 2, new Dictionary < i...
I'm trying to run nunit-console.exe from a script and I get an 'Unable to locate fixture' error, but only when I have NUnit GUI also running. Once I close the NUnit GUI the script runs the tests just fine. Here is nunit command being executed by the script; "C:\Dev\Test1\Build\NUnit\nunit-console.exe" "C:\Dev\Test1\Tests\bin\Release\T...