integration-testing

How to automate integration testing that requires multiple computers?

How do you automate integration testing that requires 2 or more PCs (distributed app)? What's your strategy for performing integration testing (or performance testing) on the cases where multiple machines are involved? Example We need to integration-test our client/server app. To mimic the live-system, we need to deploy the client on o...

How should we setup up complex situations for tests?

I'm currently working on what I would call integration tests. I want to verify that if a WCF service is called it will do what I expect. Let's take a very simple scenario. Assume we have a contract object that we can put on hold or take off hold. Now writing the put on hold test is quite simple. You create a contract instance and ex...

Ruby on Rails testing: How can I test or at the very least see a form_for's error_messages_for?

I'm working on creating a tests, and I can't figure out why the creation of a model from a form_for is failing in the test but works in real browsers. Is there a straightforward way for me to see what the problems are in the model creation? Even better would be, is there a straightforward way for me to test the error outputs that I acc...

How to test a confirm dialog with Cucumber?

I am using Ruby on Rails with Cucumber and Capybara. How would I go about testing a simple confirm command ("Are you sure?")? Also, where could I find further documentation on this issue? Thank you! ...

How to do integration testing?

There is so much written about unit testing but I have hardly found any books/blogs about integration testing? Could you please suggest me something to read on this topic? What tests to write when doing integration testing? what makes a good integration test? etc etc Thanks ...

What is the fastest way to clear out a database using NHibernate?

I intend to perform some automated integration tests. This requires the db to be put back into a 'clean state'. Is this the fastest/best way to do this? var cfg = new Configuration(); cfg.Configure(); cfg.AddAssembly("Bla"); new SchemaExport(cfg).Execute(false, true, false); ...

Mock versus Implementation. How to share both approaches in a single Test class ?

Hi, See the following Mock Test by using Spring/Spring-MVC public class OrderTest { // SimpleFormController private OrderController controller; private OrderService service; private MockHttpServletRequest request; @BeforeMethod public void setUp() { request = new MockHttpServletRequest(); re...

Can you perform unit / integration tests without creating test codes?

In our project, test procedures and expected test results (test specifications) are created in a document. Then, we perform testing on a built product / release. Here, no test codes nor test tools are involved. Is this acceptable for unit / integration testing? ...

How to assert/unit-test servers JSON response?

My current project uses JSON as data interchange format. Both Front-end and Back-end team agree upon a JSON structure before start integrating a service. At times due to un-notified changes in JSON structure by back-end team; it breaks the front-end code. Is there any external library that we could use to compare a mock JSON (fixture) w...

Exception in java while using obex(Bluecove bluetooth)

I am getting the following error while trying to send a video file from PC to mobile using a bluetooth dongle. The program works fine when run individually but when i use it with other classes,i get te folowing exception. java.lang.NullPointerException at de.avetana.bluetooth.obex.OperationImpl$OBEXPutOutputStream.write(Operatio...

Facebooker Causing Problems with Rails Integration Testing

I am (finally) attempting to write some integration tests for my application (because every deploy is getting scarier). Since testing is a horribly documented feature of Rails, this was the best I could get going with shoulda. class DeleteBusinessTest < ActionController::IntegrationTest context "log skydiver in and" do setup do...

Where are the factory_girl records?

I'm trying to perform an integration test via Watir and RSpec. So, I created a test file within /integration and wrote a test, which adds a test user into a base via factory_girl. The problem is — I can't actually perform a login with my test user. The test I wrote looks as following: ... before(:each) @user = Factory(:user) @brow...

Separate Database for Integration Testing

I am performance integration testing where I fire up the ASPX pages using WatiN and fill the fields and insert into the database. There are couple of problems that I am facing. 1) Should I use a completely separate database for integration testing? I already gave db_test and db_dev. db_test is for unit testing and is cleared after each...

SSIS Script Component Testing Strategy

This question is in respect to the script component specifically. I am aware of ssisUnit etc… With simple SSIS Scripts Components, it’s sufficient to let basic testing flesh out issues, however I am working with a script that has grown in complexity over time. To better test the functionality I am considering abstracting the script lo...

How To Run integrational Tests

In our project we have a plenty of Unit Tests. They help to keep project rather well-tested. Besides them we have a set of tests which are unit tests, but depends on some kind of external resource. We call them external tests. They can access web-service sometimes or similar. While unit tests is easy to run the integrational tests coul...

Testing Watir on Firefox throws JsshSocket::JSReferenceError

I am using Watir on Windows and when my script tries to run on Firefox, I see this error on my console: JsshSocket::JSReferenceError: Components is not definedReferenceError: Components is not defined C:/xampp/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/jssh_socket.rb:12:in `js_eval' C:/xampp/Ruby/lib/ruby/gems/1....

Simulating Ajax failures for QA testing

Our first ASP.Net MVC/jQuery product is about to go to QA, and we're looking for a way for our QA guys to easily be able to simulate bad Ajax requests (without modifying the application code). A typical integration/UI test plan might be: Load page, click button "DoStuff" "DoStuff" fails Attempt button "DoStuff" again "DoStuff" succe...

Integration Test Example With Rhino Mocks

I have two classes. I would like to verify that the properties are called on one of the classes. public classA { public IBInterface Foo {get;set;} public LoadData() { Foo.Save(1.23456, 1.23456); } } public classB : IBInterface { public decimal ApplePrice {get; set;} public deci...

Junit: splitting integration test and Unit tests.

Hello all, I've inherited a load of Junit test, but these tests (apart from most not working) are a mixture of actual unit test and integration tests (requiring external systems, db etc). So I'm trying to think of a way to actually separate them out, so that I can run the unit test nice and quickly and the integration tests after that....

Is there a Java Package for testing RESTful APIs?

I'm getting ready to dive into testing of a RESTful service. The majority of our systems are built in Java and Eclipse, so I'm hoping to stay there. I've already found rest-client (http://code.google.com/p/rest-client/) for doing manual and exploratory testing, but is there a stack of java classes that may make my life easier? I'm using...