integration-testing

How to decouple a middle tier and a dataset to allow for unit testing?

Howdy, I have a question at SO asking how to wire a middle tier to a DataSet. I put up an answer showing what I had come up with, but I am not happy with the tight coupling. I have just started to get into testing and find it a good goal for my code. How would this code be de-coupled to allow for unit testing? Thank you, Keith ...

Starting external process during integration testing in maven

I want completely automated integration testing for a Maven project. The integration tests require that an external (platform-dependent) program is started before running. Ideally, the external program would be killed after the unit tests are finished, but is not necessary. Is there a Maven plugin to accomplish this? Other ideas? ...

Problem using SQLite :memory: with NHibernate

I use NHibernate for my dataacess, and for awhile not I've been using SQLite for local integration tests. I've been using a file, but I thought I would out the :memory: option. When I fire up any of the integration tests, the database seems to be created (NHibernate spits out the table creation sql) but interfacting with the database c...

Selenium: wait_for_* and friends in Selenium RC ruby driver

Are there any implementations of all the nifty Selenium on Rails methods like wait_for_visible, assert_not_text_present, ... for the ruby driver of Selenium RC? If not, how would I go about implementing something like wait_for_visible? ...

What does unit testing mean to you?

G'day, I am working with a group of offshore developers who have been using the term unit testing quite loosely. Their QA document talks about writing unit tests and then performing unit testing of the system. This doesn't line up with my interpretation of what unit testing is at all. I am used to unit testing being a test or suite o...

What best practices do you use for testing database queries?

I'm currently in the process of testing our solution that has the whole "gamut" of layers: UI, Middle, and the omnipresent Database. Before my arrival on my current team, query testing was done by the testers manually crafting queries that would theoretically return a result set that the stored procedure should return based on various r...

Incite database failure for integration test

When running an integration test (Web Service talking to JDBC, in this case) how do you force the database to throw an error so that the resulting soap fault can be inspected? I'm using Spring's Transactional Test Framework, so would be unreasonable to just issue a DROP TABLE whatever; to break it? :D ...

Testing Web Services Consumer

Here are some tools that I have found to test web services consumers: http://www.soapui.org/ https://wsunit.dev.java.net/ Are there any others? I would prefer testing frameworks that are written in Java or Python. ...

Unit tests vs integration tests with Spring

I'm working on a Spring MVC project, and I have unit tests for all of the various components in the source tree. For example, if I have a controller HomeController, which needs to have a LoginService injected into it, then in my unit test HomeControllerTest I simply instantiate the object as normal (outside of Spring) and inject the pro...

Can we use JUNIT for Automated Integration Testing?

How do you automate integration testing? I use JUnit for some of these tests. This is one of the solutions or is totally wrong? What do you suggest? ...

Where do you take mocking - immediate dependencies, or do you grow the boundaries...?

So, I'm reasonably new to both unit testing and mocking in C# and .NET; I'm using xUnit.net and Rhino Mocks respectively. I'm a convert, and I'm focussing on writing behaviour specifications, I guess, instead of being purely TDD. Bah, semantics; I want an automated safety net to work above, essentially. A thought struck me though. I ...

Good book or other resource on integration testing?

There are enough books on how to do unit testing. Do you know any good books (or other good resources) on integration testing? What I am particularly interested in is Define scope (unit testing < integration testing < automated func. testing What is a good and bad integration test Data access Service layers Configuration Spring or ...

TDD and ADO.NET Entity Framework

I've been playing with ADO.NET Entity Framework lately, and I find that it suits my needs for a project I'm developing. I also find cool its non-invasive nature. After generating a data model from an existing database you are faced with the task of integrating the generated model and your business logic. More specifically, I'm used to i...

Unit testing code that basically does persistence - Should I bother?

I am using an api which interacts with a db. This api has methods for querying, loading and saving elements to the db. I have written integration tests which do things like create a new instance, then check that when I do a query for that instance, the correct instance is found. This is all fine. I would like to have faster running...

How to integration-test a network application in C

I've never managed to move from unit-testing to integration-testing in any graceful or automated way when it comes to network code. So my question is: Given a simple single-threaded client/server based network application, how would you go about integrating both client and server into your currently favorite testing suite (I currently u...

Should I mix my UnitTests and my Integration tests in the same project?

I am using NUnit to test my c# code and have so far been keeping unittests (fast running ones) and integration tests (longer running) seperate and in separate project files. I use nunit for doing both the unittests and the integration tests. I just noticed the category attribute http://www.nunit.org/index.php?p=category&amp;r=2.2 that nu...

Unit/Integration Tests, how granular should they be?

I am testing the UI of my ASP.Net Web Forms app using NUnit/Watin. I understand the high level concepts around TDD, Unit Testing, integration testing etc, but have not had much of a chance to put them to use until now. So, when I am testing the validation logic on a data entry form, should I be writing one test that triggers each of ...

How to configure JPA for testing in Maven

Is there a way to set up a second persistence.xml file in a Maven project such that it is used for testing instead of the normal one that is used for deployment? I tried putting a persistence.xml into src/test/resources/META-INF, which gets copied into target/test-classes/META-INF, but it seems target/classes/META-INF (the copy from the...

How integration tests are performed on your company/job/project?

Hello, I want to improve integration tests methods where I work and I would like to know how this process happens in other places. Things like: - When test plans writing begin - Proportion between testers, developers and stuff (entire applications or modifications) to be tested - What kind of methods are used for integration testing....

Integration testing an external library?

I am using an external library in a java project but I am not sure how can I integration test it with my code. For example: Let us say I am using a string encryption library to encrypt passwords. Please enlighten. Thanks ...