testing

What is the difference between AutomationID and AutomationProperties.Name?

What is the difference between the two properties? In what context is which property used? Can you also provide a code example for each? ...

Best way to unit test Collection?

I'm just wondering how folks unit test and assert that the "expected" collection is the same/similar as the "actual" collection (order is not important). To perform this assertion, I wrote my simple assert API:- public void assertCollection(Collection<?> expectedCollection, Collection<?> actualCollection) { assertNotNull(expectedC...

How to manage IoC containers in tests?

I'm very new to testing and IoC containers and have two projects: MySite.Website (MVC) MySite.WebsiteTest Currently I have an IoC container in my website. Should I recreate another IoC container for my test? Or is there a way to use the IoC in both? ...

Unit Testing during maintenance phase

Our project is currently under maintenance. We have never had unit testing for this project. We were planning on writing unit test for the delta's rather than writing unit test for the entire application. What would be the preferred approach. Does it really add value to add unit testing during the maintenance phase ??? We are still with ...

UI Testing Tool on linux

Looking for a tool to UI testing on Linux .Platform used for development is django. The idea is that the analysts will capture the tests thru some UI and it will be able to be played back over and over again. ...

How to skip certain tests with Test::Unit

In one of my projects I need to collaborate with several backend systems. Some of them somewhat lacks in documentation, and partly therefore I have some test code that interact with some test servers just to see everything works as expected. However, accessing these servers is quite slow, and therefore I do not want to run these tests ev...

Any good tools or tips for fuzz testing Windows forms applications?

I'm maintaining a ~300K LOC C# legacy thick-client application with a Windows.Forms interface. The app is full of little bugs and quirks. For example, I recently discovered a bug where if a users edits and tabs (not clicks) through cells on a DataViewGrid, and leaves the a certain cell selected, the app gets an "Object reference not se...

Using *Darwin as a test bed for Mac OSX applications

Since Mac virtualization is technically illegal on anything but a Mac computer, is it possible to use one of the Darwin distros as a platform to test applications meant for Mac OSX? From the little I've read, it seems *Darwin and MacOSX have a very tight relationship, but I haven't really found any information on the internet about usi...

White-box testing in Javascript - how to deal with privacy?

I'm writing unit tests for a module in a small Javascript application. In order to keep the interface clean, some of the implementation details are closed over by an anonymous function (the usual JS pattern for privacy). However, while testing I need to access/mock/verify the private parts. Most of the tests I've written previously have...

Homoscedascity test for Two-Way ANOVA

I've been using var.test and bartlett.test to check basic ANOVA assumptions, among others, homoscedascity (homogeniety, equality of variances). Procedure is quite simple for One-Way ANOVA: bartlett.test(x ~ g) # where x is numeric, and g is a factor var.test(x ~ g) But, for 2x2 tables, i.e. Two-Way ANOVA's, I want to do something lik...

who wrote 250k tests for webkit?

assuming a yield of 3 per hour, that's 83000 hours. 8 hours a day makes 10,500 days, divide by thirty to get 342 mythical man months. I call them mythical because writing 125 tests per person per week is unreal. can any wise soul out there on SO shed some light on what sort of mythical men write unreal quantities of tests for large soft...

Is there a free code coverage tool suitable for use with .NET 4 and NUnit?

Is there a free code coverage tool suitable for use with .NET 4 and NUnit that runs from the command line (and is thus suitable for use on a build server)? Please note that any tools that require editions of Visual Studio higher than Professional are not appropriate in this case. I am asking this question because I can't get NCover 1.5...

Using Django.test.client to check template vars

I've got a view that I'm trying to test with the Client object. Can I get to the variables I injected into the render_to_response of my view? Example View: def myView(request): if request.method == "POST": # do the search return render_to_response('search.html',{'results':results},context_instance=RequestContext(re...

Testing WIA without having a scanner/camera device

Hello, I wrote a simple scanning code using WIA. I don't have a scanner device so I can't test it. Can I simulate a WIA device to testing it ? ...

How to run tests in plugins?

We have splitted our grails application into several inplace-plugins. Now we want to have the tests in the same plugin like the classes which they test. Is it possible to configure our application (e.g. in BuildConfig.groovy) so that the tests in the plugins are executed too when we run "test-app"? ...

Testing flex with selenium without updating code

Hi all, I have been asked to check how to load test a flex application. I've though about using Selenium, since it's precisely its job. I've also found that testing Flex with Selenium requires extensions to Selenium. I've seen that there some of these : sfapi flex-ui-selenium First, it seems that both requires me to rebuild my Fle...

using spring, hibernate and scala, is there a better way to load test data than dbunit?

Here are some things I really dislike about dbunit: 1) You cannot specify the exact ordering the inserts because dbunit likes to group your inserts by table name, and not by the order you define them in the XML file. This is a problem when you have records depending on other records in other tables, so you have to disable foreign key co...

Best practices for TDD BDD with code that uses external services / api

I'm using a twitter gem which basically accesses twitter and lets me grab tweets, timeline etc. Its really good but I have a lot of my code that uses the stuff it returns and I need to test it. The things the gem returns aren't exactly simple strings, there pretty complex objects (scary as well) so im left scratching my head. So basica...

Finding data file location while using Microsoft Test Framework

I have been using NUnit and now I am switching to the Microsoft Unit Test frame work. In my test project I have a folder called TestData and I kept all my test input data files there. I want to use that files for my unit testing. In my test code, I am using Application name space and assembly name space but I can not get to the data fold...

jquery - loading inline javascript via AJAX

I have thrown together a quick prototype to try and establish a few very basic truths regarding what inline JavaScript can do when it is loaded with AJAX: index.html <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt; </head> <body> <script type="tex...