I know there is no right or wrong answer to this but it would be VERY helpful to see how others have structured their test projects? Especially for multi assembly solutions and managing different test phases, unit, integration, system?
And ontop of it all it would be helpful to see what structure fits nicely for running test builds ...
Or in another way, is there any reason to install NUnit or any other library and use it instead of the one that comes with Visual Studio 2008?
...
Hi there,
Can anyone help, i have been succesfully testing with the built in tdd that ships with vs 2008. But now i wish to test my wcf... I added a default.aspx in the wcf service (you need to do this according the ms) ... now when i put a break point in my test.. and click the icon debug test in current context, all goes well ..,the t...
I'm struggling to figure out what should be excluded from functional tests (in my case, using Rails, but I guess the framework's probably irrelevant).
I'm under the impression that I shouldn't bother using functional tests for things that will be caught in unit tests -- such as checking that a field can't have too many characters, or th...
Hi,
I'm doing unit testing in CakePHP. I want to test two of my controllers. My app has different kinds of users. I want to test the results the app return depending on which type of user is logged in. I don't know, however, how to log in to the app from the controller test case. I tried a couple of approaches without success. 1) I t...
I just looked back through the project that nearly finished recently and found a very serious problem. I spent most of bank time on testing the code, reproducing the different situations "may" cause code errors.
Do you have any idea or experience to share on how to reduce the time spent on testing, so that makes the development much mor...
Hi, I'm programming in Java and my applications are making a lot of use of DB. Hence, it is important for me to be able to test my DB usage easily.
What DB tests are all about? For me, they should supply two simple requirements:
Verify SQL syntax.
More importantly, check that the data is selected/updated/inserted correctly, according...
PHPUnit works great, I love it actually, problem I'm having is that my hosting plan imposes a 30 second cap on the duration of a query. If PHPUnit tests take longer than that, the connection is closed by the server, and I never get to find out if all my tests passed or not.
Is there an existing automatic way of running an arbitrarily l...
When I try to run Unit Tests (mstest) I run into this issue.
The line of code:
_mainCnStr = System.Configuration.ConfigurationManager.
ConnectionStrings["main"].ConnectionString;
Comes back as a null reference
It doesn't do this in the main UI project when I run it. What is the right method to get this connection str...
I ran into a bug in some code that extracts metadata from some text and puts it into a dictionary.
My test was failing when I compared two dictionary objects because the keys were in different order. I don't really care what order the keys are in.
I'd like to have an assert method available like :
Assert.AreEquivalent(propsExpected,...
Is there a difference between assertEquals and assertEqual in the python unittest.TestCase.
And if it is not why are there two functions? Only for convenience?
...
This post started out as "What are some common patterns in unit testing multi-threaded code ?", but I found some other discussions on SO that generally agreed that "It is Hard (TM)" and "It Depends (TM)". So I thought that reducing the scope of the question would be more useful.
Background : We are implementing a simple scheduler that g...
I have a unit test that will test to see if a method that returns the correct IEnumerable. The method builds the IEnumerable using yield return. The class that it is an IEnumerable of is below:
enum TokenType
{
NUMBER,
COMMAND,
ARITHMETIC,
}
internal class Token
{
public TokenType type {get; set;}
public string te...
I have a Logging class which gets instantiated on startup of a console app and the stored in a static variable.
If i want a class to use the logger should it be passed to the class in the constructor or referenced directly?
I'm trying to write unit tests and either way i should be able to do it. Just means i have to set the static vari...
The title says it all - how do I use Assert (or other Test class?) do verify that an exception has been thrown?
Thanks :)
...
Does anyone know of any guides or any sort of documentation on how to set up the new Flex Builder 4 beta? I've been pulling my hair all day long, none of my tests are executed and I can't for the life of me understand what's wrong. There are no errors at all. It's as if the metadata tags are not recognized, is there some special compiler...
I've been trying to find some straightforward information on this, but I haven't been able to - either what I've found has been to vague for me to understand what's going on, or too specific for the wrong thing, for example a tutorial I found for unit testing an AuthorizeAttribute. (A third alternative is of course that I'm too dumb to r...
We have a Web Application Project (dozens actually..) that has a testing project attached to it. In the testing project I have a simple unit test which exercises a couple of methods.
Running locally, the unit test executes and works.
However, when our TFS Build server attempts to execute the test, it fails with a error about an invali...
Are there any developers out there who's primary job description is to write unit tests and build test frameworks for other developers at the company?
It would seem to make sense for several reasons. For example, there are companies who are specialists in wind tunnel testing. They have standardized tests that they've created which pro...
I'm working on moving as much logic out of a custom control as possible so that it can be unit tested to reduce manual testing burden. I'm having trouble with situations where a method under test produces a complex result; writing a test case that calculates the result would involve writing what is essentially the code under test into t...