I'm setting up a bunch of unit tests using CppUnit but am having the problem that none of the tests are being run. The project is divided up into several small libraries and I planned on dividing the unit test classes up the same way and then linking them all into a single test program. The problem is, then the test classes are in thei...
I have just read Michael C. Feathers great book Working Effectively with Legacy Code, the bible of introducing tests to legacy code. In this book he describes something called Edit-triggered testing:
If it isn't out by the time this book is released, I suspect that someone will soon develop an IDE that allows you to specify a set of ...
Hello. I've a project in .NET Framework 3.5 and as i can see nUNIT does not support it yet. What unit testing framework would you recommend for my needs?
...
I'm currently on a co-op term working on a project nearing completion with one other co-op student. Since this project has been passed down from co-op to co-op, poor practices have been taken along the way and testing has been left until the end. I've decided I'd like to write unit-tests to learn something new while testing.
However, ...
Hi
I am new to unit testing and I am trying to test some of my .Net membership stuff I been writing.
So I am trying to check my VerifyUser method that checks if the users credentials are valid or not.
So this is what it looks like:
public bool VerifyUser(string userName, string password)
{
bool valid = Membership.Validat...
When doing Unit Testing, is there a way to tell the [TestClass()] to execute one [TestMethod()] by one? (Instead of Visual Studio to start multiple thread). This would be required for only one or two of my testing classes.
...
I currently use a simple convention for my unit tests. If I have a class named "EmployeeReader", I create a test class named "EmployeeReader.Tests. I then create all the tests for the class in the test class with names such as:
Reading_Valid_Employee_Data_Correctly_Generates_Employee_Object
Reading_Missing_Employee_Data_Throws_Invalid_...
Sometime, when the Unit Test of a class has been done and method use _Accessor while the code has changed. What ever you compile many time it still doesn't "synchronize" the _Accessor file. The only thing that work is closing VS2008 and reopend it. Any trick to "regenerate" the Testing Accessor?
...
For my university class we are developing a multi-threaded Blackberry application which allows us to scan for other devices running our application with Bluetooth and then transfer files to each-other by TCP over the Wifi interface, implementing NAT traversal, all the while logging our GPS location. (It's a RIM sponsored Computer Network...
I'm somewhat new to writing tests. I've find myself struggling with keeping my setUp's clean and concise, instead trying to accomplish too much with an uber-setUp.
My question is, how do you split up your testing?
Do your tests include one or two lines of independent step code?
def test_public_items():
item1 = PublicItem()
it...
Regarding the classic test pattern of Arrange-Act-Assert, I frequently find myself adding a counter-assertion that precedes Act. This way I know that the passing assertion is really passing as the result of the action.
I think of it as analogous to the red in red-green-refactor, where only if I've seen the red bar in the course of my...
I am looking for a mature framework that can do Javascript mocking, especially on AJAX and JSON area.
Is there any existing mocking framework for Javascript ( and/ or JQuery) that you are used and can recommend?
Edit: I have evaluated jqmock and jqunit. It seems that it's the only framework that can do basic library mocking and stubbin...
I have licensed my software under LGPL. I am too lazy to include the licensing headers in all files, so I skipped the unit tests files. Is that a problem?
...
Hi,
I have been using VSTS 2005 for creating Unit Test cases and also to run Load Tests. VSTS Test Edition has a feature where I can use Unit Test created inside Load Test, i.e, I can stimulate multiple users for a created Unit Test to check performance.
If I run a load test (which internally is calling a unit test, not a web test) for...
App:MFC backed by oracle
Unit testing framework:googletest
I am going to unit testing the code that will be added here on to the project.Unit testing framework is googletest. I am new to unit testing. Is googletest is ok for my application how can I get started?
...
I have a class that wraps the GetGlobalResourceObject and GetLocalResourceObjet so they can be used easily in MVC. The model validation classes then load the error messages dynamically from resource files. The problem is unit testing. The code uses "~/", and while everything functions correctly when the solution is run, I cannot see h...
Hi
I am trying to learn unit testing. I am trying to unit test some Memembership stuff I am making in asp.net mvc 1.0. I been following a book on MVC and I am confused about some stuff that hopefully someone can clear up for me.
I am using Nunit and Moq for my frameworks.
Question 1:
public AuthenticationController(IFormsAuthentica...
I've set up a test database to begin unit-testing an app that I've recently been added to. It is a 3-tier design (presentation layer, BOL and DAL) and this is my first time writing unit tests.
I've decided to start at the BOL and I figure the best way is to swap out the ConnectionString (which has been passed along as a Shared String...
I want to run unit tests (Junit) on some model classes that typically will send emails confirming that things happened. Is there a mock email server that you can use with unit tests that will let you confirmation that your run tried to send an email without actually sending the emails out?
This seems like it would be a nice to have, ju...
i am working on a project that requires Rails 1.2.6. I am setting up my first test environment, but i get a "rake aborted! Don't know how to build task 'db:test:load'"
when i try "rake db:test:load." is this command only for Rails 2.x? do i need to use a deprecated command?
...