testing

how to test or describe endless possibilities?

Example class in pseudocode: class SumCalculator method calculate(int1, int2) returns int What is a good way to test this? In other words how should I describe the behavior I need? test1: canDetermineSumOfTwoIntegers or test2: returnsSumOfTwoIntegers or test3: knowsFivePlusThreeIsEight Test1 and Test2 seem vague and it woul...

Performancetest: Flash/AS3 Processing/Java and openFrameworks/C++

Hi there, I need to compare the performance of AS3, Processing and openFrameworks for my Bachelor thesis. Are there any comparison tables you know of or do I have to do the test myself? How would a good test look like? I'm just focused on graphics so I thought about maybe three different programs, a 2d-graphics app, a typographic-app ...

Unit testing framework for .NET, Comparison!

I have used a bit of MS VS2008 integrated Unit Testing framework for writing unit test, but not that extensive, any suggestions which framework will work best for web based applications developed using ASP.NET. ...

How to install a provisioning profile on windows 7 for testing

Hi, how can I install a provisioning profile on windows 7? Just dragging it onto the iTunes icon doesn't seem to work like it would on a mac... It only "pins" it together. ...

How to use Jquery Ajax Cache, is there a useful plugin for that and how can i test it?

I am using the jquery $.Ajax property for getting some data from database as json and manipulating dom with that. For example like this: $.ajax({ type: "POST", url: "TipsAndTricksService.asmx/postCommentForTT", data: "{'ttID':'" + ttID + "','text':'" + answerText + "','authorOfTT':'" + authorOfTT + "'}", contentType: "applicati...

Testing a scoped find in a Rails controller with RSpec

I've got a controller called SolutionsController whose index action is different depending on the value of params[:user_id]. If its nil, then it simply displays all of the solutions on my site, but if its not nil, then it displays all of the solutions for the given user id. Here it is: def index if(params[:user_id]) @solutio...

Unittesting aspect-oriented features.

Hi, I'd like to know what would you propose as the best way to unit test aspect-oriented application features (well, perhaps that's not the best name, but it's the best I was able to come up with :-) ) such as logging or security? These things are sort of omni-present in the application, so how to test them properly? E.g. say that I'm...

Automating an application

I've always wondered the best way to automate use of a GUI in windows. When I was about 15, I wrote a little application that used some simple Windows API functions to automatically click on certain locations on the screen based on a script. This could be used to automate GUI applications, but surely it's not the best way. So, my quest...

How should we setup up complex situations for tests?

I'm currently working on what I would call integration tests. I want to verify that if a WCF service is called it will do what I expect. Let's take a very simple scenario. Assume we have a contract object that we can put on hold or take off hold. Now writing the put on hold test is quite simple. You create a contract instance and ex...

Is it a good idea to mock/stub in integration tests?

Say there are multiple requests in a integration test, some of them are local sphinx calls(locator for example). Should we just stub out the entire response of these sphinx call, or, since it is a integration test, we want to excise the entire test without stubbing. If that is the case, how do we still keep test independent in the situa...

Any testing suggestions on replace a 3rd-party production?

It's a complex 3rd-party DLL. Phase 1 for My project already finished. I need find a good way to integrate testing with both my DLLs and 3rd-party DLL. Now I need to replace the 3rd-party DLL with some of my my small DLLs step by step. All the interface member are same names. How to disable some of the 3rd-party DLL reference and ena...

not using partial mocking? do they also mean in web-app?

Im learning Mockito and in chapter 16 they say you should not use partial mocking in new system. I disagree, for example in one of my actions i use partial mocking for static framework methods, sql calls, etc. I extracted the stuff into methods and then mock it in tests. Most of those methods are specific to this action and wont be call...

How can I get to the value of my WPF UserControl DependencyProperty from UI Automation Framework?

Hi, I'm having trouble getting access to my WPF UserControl DependencyProperty values through the UI Automation Framework. I've used James McCaffreys article in MSDN as a starting point (Automating IO Tests in WPF Applications, MSDN March 2009), but I can only see properties etc in standard controls such as buttons. I'm assuming ther...

Dependency breaking techniques using dependency Inj for unit testing

Currently reading "The Art of Unit Testing" by Roy Osherove. I'm about half way through it and so far it's an awesome book. I'm going to ask everyone to leave IOC containers out of this discussion. He only briefly mentions them (actually states IOC are out of the scope of the book which I don't understand and is one of the few places whe...

Test presenter in ASP.NET Web Form

Hi, I am working on an ASP.NET WebForm application using MVP pattern. For every Web Form, there is a Presenter class associated to handle UI and Business logic. However, I had problem when writing unit tests for Presenters, since session values are used in presenters. And there is no HTTP context exists during execution of the unit tes...

Entire monorail action invocation in tests

BaseControllerTest.PrepareController is enough for controller properties setup, such as PropertyBag and Context [TestClass] public ProjectsControllerTest : BaseControllerTest { [TestMethod] public void List() { // Setup var controller = new ProjectsController(); PrepareController(controller); controller.List(); // Asserts ...

Is hardware impossible to debug without software?

Disclaimer: I am (mostly) hardware ignorant. This is probably my problem. However I find it hard to accept that it is not possible to debug hardware so therefore I just wanted to get some second opinions. We have an issue. Where certain actions (swapping Usb devices in and out at run-time) can blow either the Usb hub or chip on our Usb ...

What to test when writing Unit Tests?

I want to begin unit testing our application, because I believe that this is the first step to developing a good relationship with testing and will allow me to branch into other forms of testing, most interesting BDD with Cucumber. We currently generate all of our Base classes using Codesmith which are based entirely on the tables in a...

How To Abstract NHibernate To Avoid Tight Dependency and Facilitate Testing

Is it possible to adopt the use of an O/RM like NHibernate or Entity Framework, and abstract it in such a way that it could be replaced if a situation is encountered that the O/RM cannot handle. It seems tempting to create a service with chunky service methods inside of which, a session is created, the session is used to get / upsert e...

Testing a Gui-heavy WPF application.

We (my colleagues) have a messy 12 y.o. mature app that is GUI-based, and the current plan is to add new dialogs & other GUI in WPF, as well as replace some of the older dialogs in WPF as well. At the same time we wish to be able to test that Monster - GUI automation in a maintainable way. Some challenges: The application is massive. I...