testing

Best way for testing compiled code to return expected output/errors

How do you test if compiled code returns the expected output or fails as expected? I have worked out a working example below, but it is not easily extendable. Every additional test would require additional nesting parentheses. Of course I could split this into other files, but do you have any suggestions on how to improve this?. Also I...

Installing Mocha 0.9.7 in a Rails 2.3.3 project

I installed the Mocha 0.9.7 Rails plug-in using: $ script/plugin install git://github.com/floehopper/mocha.git (Just followed instruction in http://mocha.rubyforge.org/) Then, I have the following set-up defined in my functional test def setup @controller.expects(:logged_in?).returns(true) @controller.expects(:admin_user?).retur...

Handling Non-User data in Rails tests

We have a ton of non-user data: 500 product types that haven't changed in 20 years, 200GB of geospatial data that never changes (Queens is always 40.73N/73.82W)... etc. It's the same in Development and Production. It should be the same in Test, but the during testing Rails empties all of the test tables, and it takes a ton of time to r...

What should I do if my Rails tests don't pass?

I want to start contributing to Rails, fixing patches, submitting my own code etc, and the Rails guide states that the tests MUST run. However, they're currently not and I'm not quite sure what to do. I'm running Mac OS X, Ruby 1.8 and I have all the needed gems installed - what can I do? ...

Is there a testing tool to test a C# .net web service that contains complex types?

I have built a C# .net web service that takes a complex type as a parameter. Is there a testing tool that I can run against my web service and pass all of the values to the complex parameter type? Some background info: I ran the xsd.exe tool against my XSD and have created a .cs class. This .cs class has the dataset that is used as my...

BlackBerry API Compatibility Testing

Is there an easy way to find out the minimum BlackBerry API version required by an application? I know there are several ways, but I think there must be something really simple that is too obvious for me to think of. One way would be to download all device simulators provided by RIM and test the application on each of them. Another way c...

Spawning a separate process from within a unit test

I have some unit tests (yes, perhaps more integration-ey tests !) that I would like to spin up another jvm, and then run the test code from that "other" JVM (and wait for it to finish, collecting the results). Am interested if there is an easy/reliable way of doing that with junit (eg inherit the classpath of what is needed etc...) Any...

Top 10 negative testing list

Hi all, I searched SO, finding little thing about negative testing, which is also a very important thing developers should keep in mind during work. What about making a list of top 10 test case for the negative testing developer should keep in mind collaboratively? Thanks! The definition of Negative Testing: In software testing, a te...

Writing a Path Coverage Tool

Currently, one of our production systems is handled by over 3000 programs written between 1986 and now . The code base is written in a non-standard language, which unfortunately lacks modern testing tools. In a bid to improve our code quality moving forward I have been working to incorporate processes and build tools that will improve d...

Selenium's wait_for_condition in Internet Explorer

I'm trying to get Selenium to wait for all of the AJAX requests on a page to complete before proceeding to the next command. I'm using wait_for_condition and the following JavaScript: function(){ var wait = function() { return jQuery.active == 0; } return wait.call(selenium.browserbot.getCurrentWindow()); }(); This works fine in F...

Complete webapplication testing checklist

Complete webapplication testing checklist ...

What are good references about testing a domain specific language?

I am creating a new domain specific language. How do you test a language, or something you can do (transform, compile, check) with a language. What are good references or starting points for learning about best practices? ...

How to test app for Vista

I've written an app that connects to websites APIs and does some things there. It is a app written in C#, .NET 3.5 on a XP OS. Now I have a problem. Some people reported that this application hangs on Vista, and not on the more new version of Windows (what was the name?) So I do not have Vista and do not have money to buy this system ...

Mutliplatform application: (Automated) Testing for Mac OSX howto?

I have a firefox based application(ff extension) that is supposedly/allegedly working on Mac OSX too. I wish to make the application formally supported in Mac OSX. For that, I need to incorporate automated tests in the build process specific to Mac OSX. With ubiquitous availability of Windows and Linux as cloud offering, executing autom...

Beginner at testing Python code, need help!

I don't do tests, but I'd like to start. I have some questions : Is it ok to use the unittest module for that? From what I understand, the unittest module will run any method starting with test. if I have a separate directory for the tests ( consider a directory named tests ), how would I import the code I'm testing? Do I need to use t...

IE6 Emulator Recommendation

Can anybody recommend a good tool for emulating IE6? Rather not have to go and install an old copy of XP somewhere. ...

Deploying a big test disguised as a program

If someone has created a small diagnostic, internal web app that uses (unit) tests as its logic, is there ever a valid reason to do that? Keep in mind that Nunit has to be deployed as well where ever this website goes. I'm of the view that programs should contain their own logic and possibly reusable parts (if available) but not wrap t...

Silverlight testing: Watin vs Selenium comparison

I was wondering how well these web test frameworks (Watin and Selenium) work for silverlight UI testing. Have anyone tried it on a project?, are Watin or Selenium well suited for silverlight?. Thanks, ...

"autotest/rails [...] doesn't [...] exist. Aborting"

I'm finding that autotest has stopped working... $ autotest loading autotest/rails Autotest style autotest/rails doesn't seem to exist. Aborting. According to this blog post, the common reason for this error is that people don't have the autotest-rails gem installed. However, I definitely have that installed: autotest-rails (4.1.0) Z...

Does Visual Studio Test Essentials/Test Runner run web & load tests?

Looking at Amit Chatterjee's Blog post on the upcoming Visual Studio Test Essentials product and in the image he has (below) he basically he says that all the blue blocks will be in Test Essentials, while all the green will be in Visual Studio Test Edition. I see Test Runner is on the blue block side - does that mean that I can create...