integration-testing

Do you separate your unit tests from your integration tests?

I was just wondering if anyone else just sees integration tests as just a special unit test. I have, however, heard from other programmers that it is a good idea to separate your unit tests and integration test. I was wondering if someone could explain why this is a good idea. What sorts of advantages would there be to treating integr...

How do you make a unit test when the results vary?

I am building an application that queries a web service. The data in the database varies and changes over time. How do I build a unit test for this type of application? The web service sends back xml or a no search results html page. I cannot really change the web service. My application basically queries the web service using HTTPU...

Selenium alternatives?

Selenium seems to be the mainstream tool for browser side testing and it isn't that horrible. But are there any alternatives hiding out there, even in beta phase? ...

What is the best mechanism for testing applets?

I'm trying to effectively build a functional test suite for an applet, and I'm trying to find a good framework for it. In the past, when I wanted to design a test suite that would serve as both functional and load testing on an application, it has always been a web-based application, or at least some kind of service-based application, a...

How do I run Rails integration tests without dropping DB contents?

I've written some integration tests that I'd like to run against a copy of my prod database before I push to production. This lets me test all of my routes are still correct, all of the pages render without errors and some of the multipage workflows work as expected. When I run the integration tests it drops the database I've loaded and...

What are unit testing and integration testing, and what other types of testing should I know about?

I've seen other people mention several types of testing on Stack Overflow. The ones I can recall are unit testing and integration testing. Especially unit testing is mentioned a lot. What exactly is unit testing? What is integration testing? What other important testing techniques should I be aware of? Programming is not my professi...

Unit Testing and Web Apps - Resources

In a J2EE web application, how do people manage resources so that they are visible to both the web context and to unit/integration tests? I find that often you end up having your source/resource folders configured a certain way during development (i.e., what Maven expects) and so your unit tests will run in your IDE. But once the web ap...

Finding suitable tests for changeset

Dear All, We are using cobertura as code coverage tool. The tests are done using RFT-Rational Functional Tester (500 odd tests). Running RFT takes quite long time. To encourage developers to run the RFT tests, we are thinking of tool that is capable of listing the tests that cover the 'change set'. Approach is roughly:-> On integra...

Do you TDD for debugging fix?

Hi, I know there's a lot of stuff on TDD and i'm trying to pick up the practice too. But i wonder is it a good idea to to TDD your bug fix too? I was thinking along the lines of find the bug and narrow it down. Write unit test to ensure that it will now pass whatever problem that it previously caused. Write more unit test for other brea...

Database data needed in integration tests; created by API calls or using imported data?

This question is more or less programming language agnostic. However as I'm mostly into Java these days that's where I'll draw my examples from. I'm also thinking about the OOP case, so if you want to test a method you need an instance of that methods class. A core rule for unit tests is that they should be autonomous, and that can be a...

How to automate integration testing ?

Hi, I'd like to know something, I know that to make your test easier you should use mock during unit testing to only test the composant you want, without external depedencies. But at some time you have to bite the bullet, and test classes wich interact with your database/file/network... So my question is : What do you do to test these...

Best practices for Eclipse Feature Integration Testing

I am developing an Eclipse feature consisting of several Eclipse plugins, using Equinox Declarative Services (DS) to wire the plugins together at runtime. I would like to add integration tests to verify the equinox configuration. In particular, I want to verify that the service components bind together as expected the bundles are a...

Do you need to do unit and integration testing if you already do functional testing?

People at my company see unit testing as a lot of extra work, that offers fewer benefits than existing functional tests. Are unit and integration tests worth it? Note a large existing codebase that wasnt designed with testing in mind. ...

What kinds of unit tests pay off the most in business value?

My question assumes that folks already believe that unit tests of some sort are worthwhile and actually write them on their current projects. Let's also assume that unit tests for some parts of the code are not worth writing because they're testing trivial features. Examples are getters/setters, and/or things that a compiler/interpreter ...

Shoulda: Testing contoller filters

So I have decided to investigate the state of Rails' testing. After reading a few accepted answers here on SO talking about how Rails' testing documentation is atrocious I am starting to agree. Thus far, I am apparently not in the club of people that understand Rails testing- even though I understand the framework quite well, or so I tho...

how to set subdomain for length of integration test on multi-site app?

what's the best way to change a subdomains for the duration of an integration test? jamis buck suggested using host! here: http://weblog.jamisbuck.org/2006/3/9/integration-testing-in-rails-1-1#12 but according to the rails API, host! only changes the host for the following single request. i'm looking for something like @request.host...

Testing EJB 3.0 components

I've got a couple of questions concerning the integrated testing EJB 3.0 components using JUnit. In your JUnit tests you can inject to session beans resource-local entity managers and therefore "simulate" ejb-container. But what if... What if you need to test if transaction attributes on your ejb methods are handled properly? Can thi...

unit testing user login/logout

I am very new to the whole unit testing concept so I'm sorry if "unit test" is the wrong word for this. I think it might actually be a "integration test"? At any rate, I am using asp.net's membership framework for login, logout, change password, etc. But I do a few extra things like updating the authentication ticket, adding an entry to...

Do you concentrate more on unit, integration or acceptance tests?

Most gigs I end up at either have little or no unit tests. Typically what are described as the unit tests are actually integration tests and will be rarely run from the developers machine. I usually start my evangelism by preaching the difference between the two and try to get people to write very focussed unit tests and leave the inte...

What are some useful tools when writing integration and qa tests?

I would like to use a unit testing framework (currently NUnit, but open to suggestions) to write system and quality assurance-type tests for a primarily .NET system. Some example use cases: A scheduled task runs various tests to ping servers and make webservice calls to ensure applications are running, then have the results aggregated...