integration-testing

Amending Web Config for Test Fixtures

I'm using CassiniDevLib to host an MVC app for integration testing. In order to do it I need to amend some config settings on the web server so they match the integration testing environment, first one being the connection string so it points to the test database. I know I can have two copies of the web.config file and rename them but ...

[Rails] Capybara doesn't recognize dynamically added DOM elements?

I seem to be having trouble testing the slick javascript things I do with jQuery when using Capybara and Selenium. The expected behavior is for a form to be dynamically generated when a user clicks on the link "add resource". Capybara will be able to click the link, but fails to recognize the new form elements (i.e. "resource[name]"). ...

Is there a way to generically wrap any function call in a try/catch block?

I am writing a bunch of integration tests for a project. I want to call each individual integration point method wrapped in a try/catch block so that when it fails, I get some sort of feedback to display, rather than just crashing the app. I also want to be able to time how long the calls take, and check return values when needed. So, I ...

how to set value of request.user_client

Hi in my tests i have get "/" and inside controller I have action that depends on browser When I run my test it fails because request.user_client is nil What can I do to fix this problem ? ...

integration testing command line PHP

I've got a PHP script that runs at the command line, executing classes that are already unit tested with PHPUnit. However, I'd like to verify that the script itself has no logical errors and runs properly. // require classes require_once 'injectedClass.php'; require_once 'DBClass.php'; require_once 'taskEngine.php'; $injectedObj = n...

IDE stopping at thrown AssertionException, rather than failing the test. (MSTestExtensions culprit?)

I am using NUnit asserts within a MSTest project like as follows (NOTE: This shouldn't matter see comments to Dave Falkner's answer): using Microsoft.VisualStudio.TestTools.UnitTesting; using MSTestExtensions; using Assert = NUnit.Framework.Assert; using Is = NUnit.Framework.Is; This has worked great in my unit tests, but in my integr...

How-to organize integration tests and unit tests

Is it ok to have integration tests and unit tests in one assembly (project) ? Or rather have them separate ? ...

NUnit integration tests and dependency injection

I'm currently making use of Castle Windsor version 2.1 as my container and would like to perform integration tests using the services registered with it. Currently, I do this my using the Common Service Locator to retrieve my service instance and perform my integration tests against it as such: var myService = ServiceLocator.Current.Ge...

Resetting all global internal state of the net-snmp library from the Python bindings

I'm trying to create automated integration tests for this hardware+software test subject which runs a SNMP agent as it's command interface. Our test setup looks like this: We're using Fitnesse as a test runner and PyFit to be able to write the tests in Python. We then use netsnmp with Python bindings to send SNMP commands. This works pre...

Best approach to integration test a Flex/Java web application via Maven?

I am working on a project that is developing a webapp with a 100% Flex UI that talks via Blaze to a Java backend running on an application server. The team has already created many unit tests, but have only created integration tests for the persistence module. Now we are wondering the best way to integration test the other parts. Here...

Database Unit-Testing. What is the best database testing approach for enterprise solution running CI, having branches and heavy databases?

So situation is following: We have some very old product, that has dozen of solutions. Many of them run different unit tests, some MSTest, some NUnit. There are lot of tests that test database, also some depend on data. In other words they execute code to check if customer Andriy has orders with products A and B. I know that this is wron...

Test Website with IE7

I need to test a website with IE7. Does anyone know if there was a way of doing this in windows7 without setting up a VM with XP+SP2 on it? ...

How can I make Spring testcontext framework use multiple data sources?

I'm trying to integration test my application with Spring TestContext framework. I have done this by extending AbstractTransactionalJUnit4SpringContextTests, as usual. However, my application has three different data sources (with names like xDataSource, yDataSource, zdataSource), så when I try to run the test, the autowiring of data sou...

How to test a client of a WCF service

I have a WCF service that exposes 1 method GetNextObjectInList(int id) which hits a DB. The WCF service works, more or less, like this: public class MyService : IDisposable { public MyService() { this.IntializeDBConnection(); } public int GetNextObjectInList(int id) { /* uses DB connection */ ...

Roo Integration Tests - FAILURE

Hi all, Thought I would try out Spring Roo so I've had loads of new fun problems today. Hopefully you guys can help me with latest one. Roo has the ability to generate integration tests for your entities, but most of them fail for me. The most common failure is some form of constraint violation like null is being inserted into non-null ...

Best way to reset database to known state between FlexUnit4 integration tests?

Background: I have a Flex web app that communicates with a Java back-end via BlazeDS. The Flex client is composed of a flex-client module, which holds the views and presentation models and a separate flex-service module which holds the models (value objects) and service objects. I am in the process of writing asynchronous integration ...

What are spec/requests good for?

I use RSpec to test my lovely little web app. For integration tests I use Steak. When using Rails generators (yep, I know that this is not the Zen way of doing TDD) there are also some files in spec/requests generated. As stated on link text it is something similiar to integration test (but I couldn't find much more info). Are those req...

Integration vs acceptance test ... what is Cucumber / Steak ?

For integration tests of my Rails web app I use Steak (something like Cucumber). The specs of Steak are in a folder named spec/acceptance. Are Steak/Cucumber now for integration or acceptance testing? I always thought that this is something different. ...

Testing tutorial and interview questions

Can anyone provide me Tutorial documents for Testing and interview questions for Testing based on Fresher level and experience level ? ...

Rails out-of-the-box integration testing

I can't seem to find anything except Rails' own documentation on its integration testing platform. Why doesn't anyone use it? How did it die out? What are alternatives? ...