unit-testing

Error running google tool kit for mac unit test

I am trying to install google toolkit for mac, everything is setup as advised here : http://code.google.com/p/google-toolbox-for-mac/wiki/iPhoneUnitTesting but when I try to compile I get this error Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘Could not load NIB in bundle: ‘NSBundle ...

Testing navigation in silverlight

I have a Silverlight application that is using a navigation frame. I am trying to write a unit-test for that application using the silverlight testing framework, however when I execute the test method I get the following error: InvalidOperationException No XAML was found at the location '/Pages/LoginPage.xaml' The unit-test method loo...

Flex Unit 4 -- Hello World

I want to use the Flex Unit 4 Suite. I don't really have any experience with unit testing. I downloaded the Turnkey project but I was a little overwhelmed. I basically just want to start by creating a simple hello world unit test. if I have a class called MyClass with 2 methods square() and cube(). and I want to create a unit test l...

How to run ALL tests in my solution using command line MSTest.exe?

According to MSDN here and discussed here, we can use MSTest.exe to run tests from command line - which is sweet and faster than running within the IDE (especially slow if you are working on a big solution like me). My question is how can I use MSTest.exe to run all tests in my solution? The command only have the /test option to filter ...

Using the check test unit framework in an embedded device?

Has anyone used check as the unit test framework in an embedded device which also requires cross-compilation? Is it even a good idea, or should I just use something else (e.g. embunit or similar)? If so, how should I write the Makefile.ams and configure.ac? I haven't used autotools to begin with so all this cross-compilation stuff cert...

using variables for unit testing only

I am writing unit tests for an app for iPhone using objective c. I want to use some variable only when compiling for test case for example #ifdef UNIT_TESTING @synthesize requestFinished, networkAvailable;//etc #endif now where should I define UNIT_TESTING that when I compile for unit tests it should enter this code block.... otherwi...

IoC Container + Unit Testing

Is it ok to use a container to create the objects that are going to be tested? Or should I build them manually? ...

Error compiling for unit test using google toolbox for mac

Hi my application runs fine but when I try to run the unit tests I am getting this error... 2010-10-19 00:27:49.919 AssignmentUnitTest[27988:903] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter' Irony is I have searched the whole project & I ...

My Visual Studio 2010 IDE is often hung when run unit tests, how to get rid of it?

Hi every one, I often have to restart my IDE when trying to run a test set from within Visual Studio 2010 since it keeps being hung/not-responding very often. Do you have the same problem? If you do, do you have a work-around for that? Please share. ...

Extending testcases from PHPUnit_Framework_TestCase instead of Zend_Test_PhpUnit_ControllerTestCase in a Zend project

Hi. I'm using Zend Framework in one of my projects and I'm using PHPUnit for unit testing. I know that Zend_Test_PhpUnit_ControllerTestCase class is good for testing controllers with its dispatch() method and all. But I also have a few simple classes like ones used for some calculations and so on. These classes do not require the entire ...

How come there's no C# equivalent of python's doctest feature?

Seems like it would be a good way to introduce some people to unit testing. ...

I am new on rails.Please post the suitable example

How to do Unit Testing in case of Association ?? Please post the suitable example. ...

UnitTesting a class that returns a complex dataset

After months of frustration and of time spent in inserting needles in voodoo dolls of previous developers I decided that it is better try to refactor the legacy code. I already ordered Micheal Feather's book, I am into Fowler's refactoring and I made some sample projects with DUnit. So even if I don't master the subject I feel it is ti...

Nunit and code coverage for C#

Hello everyone, I am using C# + .Net 4.0 + VSTS 2010. I am wondering whether Nunit is the best and easy to learn unit test tool for this platform (C# + .Net 4.0 + VSTS 2010)? If yes, I want to learn basics of Nunit, and also want to find how to generate code coverage report based on Nunit result (e.g. code coverage report to show which ...

How can I make Spring testcontext framework use multiple data sources?

I'm trying to integration test my application with Spring TestContext framework. I have done this by extending AbstractTransactionalJUnit4SpringContextTests, as usual. However, my application has three different data sources (with names like xDataSource, yDataSource, zdataSource), så when I try to run the test, the autowiring of data sou...

Unit Tests inheritance

Hi all, How do i make Base class with [TestClass()], where i will do MyClassInitialize(), and after that, i will just make my another Test classes just like that - MyNewTest : BaseTest and there will no initializing? ...

Problems with unit testing in asp.net mvc ?

UPDATE: SO I am getting the error whenever I have all meta tags like HostType,AspNetDevelopmentServerHost,URLToTest. So when I comment these tags I can run the test but I need to have these tags to have the connection string available for controller to connect to database. I created a basic unit test by just right clicking on the action ...

Multiple levels of setUp/tearDown in TestNG?

In using TestNG for my Selenium framework, the setUp method is relatively complex. There are multiple points that it can break and I would like to split it into separate steps. Ideally it would look something like this: // Does some DB stuff, logs some messages @BeforeMethod(alwaysRun = true) preTestCase // Instantiates and opens up ...

What would be a good test regimen for beginner java network program

I know this sounds a big vague so I'll try and be as precise as I can be. I'm pretty new to programming. I wrote an application a year ago that all my coworkers use on a daily basis. Now I have added a basic peer to peer update function, with an ACL defined in a local host file. It have it working in a way that file a newer date with...

How to test a client of a WCF service

I have a WCF service that exposes 1 method GetNextObjectInList(int id) which hits a DB. The WCF service works, more or less, like this: public class MyService : IDisposable { public MyService() { this.IntializeDBConnection(); } public int GetNextObjectInList(int id) { /* uses DB connection */ ...