integration-testing

Parsing URL for querystring values with Selenium IDE

I'm new to integration testing, but have had great success so far buiding up a suite of tests using Se:IDE. As I've been running my tests, it has occurred to me that I'm generating a substantial amount of data and I'd like to clean up after myself. Most of my tests involve creating a new 'page', and the id is available in the querystrin...

In Integration Testing, does it make sense to replace Async process with a Synchronous one for the sake of testing?

In integration tests, asynchronous processes (methods, external services) make for a very tough test code. If instead, I factored out the async part and create a dependency and replace it with a synchronous one for the sake of testing, would that be a "good thing"? By replacing the async process with a synchronous one, am I not testing...

Using Maven to build separate JAR files for unit testing a custom class loader

As part of my current project I've created a custom class loader. Part of the unit tests for the custom loader involves using some JAR files to demonstrate the proper behavior of the loader. I'd like to build the test JAR files from Java sources ahead of running the actual unit tests. Further, the test JAR files cannot be on the class p...

session[] doesn't persist across cucumber steps

Every time this step Given /blah.../ ... cart = session[:cart] ||= Cart.new ... end runs in a scenario, it creates a new cart as opposed to (starting from the second call) picking one up from the session. Anyone knows how to fix that? I am on rails 2.2.2, cucumber 0.3.98, webrat 0.4.4 P.S. Possibly adding selenium into ...

How to test whether application handles slow/flaky filesystems properly?

I want to ensure that my application doesn't have any UI freezes when working on files on slow filesystem (e.g. networked, CD/DVD or spun-down HDD). I'm using Cocoa filesystem operations directly. I'm afraid it would be too much effort to mock or abstract all of it just for testing, and besides there could be non-obvious ways in which m...

How to test chat application in Ruby on Rails?

What would be the best way to implement integration test for chat application? The problem is that I don't know how to implement two user behavior without stubbing and mocking everything. How would you implement these steps? Given I have two users "joe" and "bob" logged in When "joe" send "Hello!" message to "bob" Then "bob" should ...

ASP.NET MVC Controllers properly initialized when testing

How do I get an ASP.NET MVC controller properly initialized for an integration test? My current problem is that when I try to access the User member of a controller I get: System.NotImplementedException: The method or operation is not implemented. What I want is what Ruby on Rails provides out of the box with the Functional Tests....

Integration testing using Selenium and NUnit - From UI to DB

Hello! I am having some problems while trying to create integration tests with Selenium and NUnit. I'm trying to use Selenium RC in NUnit test to drive my ASP.NET web app, and would like the tests to actually do all the stuff in DB that the real user would do. Naturally it would be nice if the database could get rolled back after Selen...

How to create integration level test for two user interaction?

How would you test multi user interaction with Cucumber/webrat? Meaning that there must be more than one user logged in. Good example would be simple chat application, where I want to send message from one user to another and check if the other user received the message. I'd like to test at integration level, without any stubbing or m...

How to automate functional/integration tests and database rollbacks

Hello! In contrast to my previous question, i'll try to give my requirements. I am trying to find some framework/methodology/"thing" that would fit the following: Ability to write an automated test, preferably written in Visual Studio, using C#. Test should drive a web browser and interact with SUT just like an user would. Test shoul...

Any point in writing integration tests for a repository w/ NHibernate?

I recently spent a great deal of time pulling out a stored procedure back-end and replaced it with a NHiberante base repository. One test per repository was nice in the stored procedure version because I could verify my stored procedures worked and the class that mapped the returned data to my objects did it's job. But after I got th...

TCP Socket Testing

I have a class that receives data from a socket. What i'm looking for is a pre-existing application for testing sockets. For example I pass configuration data to the app which then fires up and sends a data to my 'receive' socket. It should also output debug information. Ive looked into hercules but I don't believe I can interop with it...

Testing Real Repositories

Hi, I've set up unit tests that test a fake repository and tests that make use of a fake repository. But what about testing the real repository that hits the database ? If this is left to integration tests then it would be seem that it isn't tested directly and problems could be missed. Am I missing something here? ...

How to automate by Firefox browser for functionality testing?

Hi all, i have to automate the firefox application to do a functionality testing, kindly help me which testing tool i can use thanks ...

LINQ to SQL Cannot create database [Schema Permissions]

For some integration tests I want to use LINQ to SQL to drop/re-create the test database. I've had this working fine before, however in this project the database is split up into several schemas. When I try to run the ctx.CreateDatabase() command I'm getting this exception: The specified schema name "xyz" either does not exist or...

Is there any value in using abstract test classes ro run Unit and Integration testing?

I have this abstract test class [TestFixture] public abstract class BaseTests { private IRepository _repository; public BaseTests(IRepository repository) { _repository = repository; } [Test] public virtual void CanGetResultsFromSearch() { var results = _re...

How do I write useful unit tests for a mostly service-oriented app?

I've used unit tests successfully for a while, but I'm beginning to think they're only useful for classes/methods that actually perform a fair amount of logic - parsers, doing math, complex business logic - all good candidates for testing, no question. I'm really struggling to figure out how to use testing for another class of objects: t...

How to determine which code in a project/solution is the most often used?

If I have an existing solution containing multiple c# projects, are there any static analysis tools that can help me determine which areas of code are the most often used? I'd like to use this information in order to determine which areas should have their test coverage ramped up first. I've looked at some static analysis tools alread...

How to initiate automated testing?

I started as a software engineer at the company I'm currently at. Over time, I was either the only one willing to or capable of taking responsibility for various systems, and so I was "promoted" to being IT Manager. Now, during my time as software engineer, I would create functional tests for the various software modules I would build, a...

(Selenium) How to test whether a download of a certain file was started?

I want to test whether a certain action results in a file download (a) at all, and (b) with the file having a certain name. Is there any way to use Selenium to do this? ...