Environment: (C# WinForms application in Visual Studio Professional 2008)
I've been digging around a little for guidance on NUnit best practices. As a solo programmer working in a relatively isolated environment I'm hoping that collective wisdom here can help me.
Scott White has a few good starting points here but I'm not sure I totall...
How can i write Code for the below method so that it can be tested in NUnit.? How to handle Hash table.?
public DataSet MySampleMethod(int param1, string param2, Hashtable ht)
{
if(ht==null)
{
ht = new Hashtable();
}
ht.Add("testKey","testData");
DataSet ds = new DataSet();
...
I get this error from my migration of NUnit to Team System when running some of the tests in Visual Studio:
Test method
XXX.XXX.Data.Tests.Path.Method> threw exception:
System.Configuration.ConfigurationException:
Invalid section name. The section
'dataConfiguration' does not exist in
the requested configuration file
'C:...
We currently use SWEA (http://webiussoft.com) to run automated tests of the site during our CruiseControl.NET overnight builds.
We are looking for a more robust solution and we are looking at the "Art of Test" (http://www.artoftest.com) solution.
Has anyone experience with this tool?
Most importantly, how easy is it to maintain tests...
public DataSet ExampleMethod(int param1, string param2, Hashtable ht)
{
if(ht==null)
{
ht = new Hashtable();
}
ht.Add("testKey","testData");
DataSet ds = new DataSet();
ds.Tables.Add();
ds.Tables[0].Columns.Add("Column1");
ds.Tables[0].Columns.Add("Column2");
ds.Tables[0].Columns.Add("...
I followed this tutorial to make NUnit tests debugable in Visual Studio. In the debugging options I set "Start external program:" to C:\Program Files\NUnit 2.4.8\bin\nunit-x86.exe.
Is there a way to get the program files directory dynamically to avoid problems when other people work with this solution on their system?
...
nunit tests fails when run through cc.net saying process timeout. Process has been killed
All works fine when through nUNit or VS.
Also cc.net will then show the results of previous build even if the build is a clean one.
Any help plz.
...
I'm trying to unit test a class with 2 constructors. Each constructor has multiple parameters that set public properties. My question is, should I have only 2 unit tests with multiple asserts to check that each property was set OR a test for each parameter for each constructor?
Public Person(string name, string phone, string birthday)...
I am attempting to unit test a silverlight 3 project. I am using:
Moq.Silverlight (3.0.308.2)
NUnitSilverlight (http://www.jeff.wilcox.name/2009/01/nunit-and-silverlight/)
When I write a test that does not use moq, it works as it should.
When I use moq outside of a test, moq works as it should.
(I mocked a interface and did a verify ...
I'm using VS2005 and NUnit.
I would like to know if there is a way to test popups using just NUnit.
button1.click();
<-Find/Assert if the popup window has been opened->
...
Hi,
I'm aware there are dozens of questions about this and blog after blog post but can someone put the simplest answer (or link to the existing question if there is an appropriate answer) to get the following working on Visual Studio 2005:
NUnit tests execute on Visual Studio
regular build (e.g. the absolute minimum changes to existi...
GC.Collect appears to start the garbage collection in a background thread, and then return immediately. How can I run GC.Collect synchronously -- i.e., wait for the garbage collection to complete?
This is in the context of NUnit tests. I tried adding the gcConcurrent setting to my test assembly's app.config file, and I tried the same wi...
I am running tests successfully on Windows Xp but not even got a single successful build while running through Windows 2003.
Any one knows whether it is compatible or not as I read on some site that Watin is fully tested on Xp and not on other windows.
Kind Regards
...
Having problems with merging multiple ncover reports into one big report, I'm looking for a free alternative to ncover.
It should have to possiblity to work with nunit, where nunit is configured to run 2 sets of tests on the same assembly (one set of tests is database independent, the other set requires a configured database).
In the en...
I am getting the following Warnings while running tests using cc.net
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets (,): warning MSB3245: Could not resolve this reference. Could not locate the assembly "nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"...
I am Using WaitforComplete() in watiN but it doesnt seems to work well. As it executes the next statement even if you have given longer time to wait. I am using thread.sleep() to stop my application until it gets the desired page or element. But the thing is pages are so much dynamic that sometimes it takes much longer time as specified....
I would like to introduce unit testing to our C++ product and wanted to investigate the pros and cons of trying to use the CLR-based unit tests. I've read that if you compile with the /clr:safe option, you can call your existing C++ code.
I'm strictly a .NET developer, so I'm at a loss for how this would affect our codebase. What shou...
I am running nightly builds using cc.net 1.4.2. I am also using nunit2.4.8. If I force the build manually it works fine but most of my nightly schduled builds fails saying testfixture setup failed. Is this some bug in nunit2.4.8 or something othert thing as I cant find out the reason
...
I've recently been building a test framework for a bit of C# I've been working on. I have NUnit set up and a new project within my workspace to test the component. All works well if I load up my unit tests from Nunit (v2.4), but I've got to the point where it would be really useful to run in debug mode and set some break points.
I've tr...
I have a test method that is run. When the method generates an exception I want to know what the name of the test was and the exception content.
In the teardown for the test I want to get access to this information. How would I get access to it from the TearDown attributed method?
...