integration-testing

How do I test expectedExceptionsMessageRegExp (exception message) using TestNG?

I'm using expectedExceptionsMessageRegExp annotation to test exception message, but the this is not executing correctly.please see the below code. Unit Test code: @Test (dependsOnMethods = "test1", expectedExceptions = IllegalArgumentException.class , expectedExceptionsMessageRegExp = "incorrect argument") public void ...

Junit test that creates other tests

Normally I would have one junit test that shows up in my integration server of choice as one test that passes or fails (in this case I use teamcity). What I need for this specific test is the ability to loop through a directory structure testing that our data files can all be parsed without throwing an exception. Because we have 30,0...

Mocking a concrete class : templates and avoiding conditional compilation

I'm trying to testing a concrete object with this sort of structure. class Database { public: Database(Server server) : server_(server) {} int Query(const char* expression) { server_.Connect(); return server_.ExecuteQuery(); } private: Server server_; }; i.e. it has no virtual functions, let alone a well-defined int...

Is the WebAii test automation framework dead?

Is the WebAii framework still available and free? Am I just missing it? After putting it off for too long, I've finally started automated UI testing on my current project. I had WebAii from ArtOfTest on my list to look at, but it looks like it's been killed off by Telerik and now they're asking $1500 for their new WebUI test studio. ...

Reducing the pain writing integration and system tests

I would like to make integration tests and system tests for my applications but producing good integration and system tests have often needed so much effort that I have not bothered. The few times I tried, I wrote custom, application-specific test harnesses, which felt like re-inventing the wheel each time. I wonder if this is the wrong...

In few words, what can be said about Mocking process in TDD

I'd like to brush my brain to avoid confusions. In few words, what can be said about Mocking process in TDD What's the GREAT idea behind MOCKING? Mocking frameworks are meant to be used only to avoid accessing DB during tests or they can be used for something else? For new comers (like me), are all the frameworks equal or I need to ch...

Integration testing - Hibernate & DbUnit

Hi, I'm writing some integrations tests in JUnit. What happens here is that when i run all the tests together in a row (and not separately), the data persisted in the database always changes and the tests find unexpected data (inserted by the previous test) during their execution. I was thinking to use DbUnit, but i wonder if it resets...

Can I stop NUnit GUI test run from code under test?

I'm using nunit.exe (v2.5.3, as it happens) for our testers to run UI tests of our web site, using WatiN. The regression test suite is up to around 100 tests. While the test suite is running, the test web site could go down for maintenance. It would be more efficient in those circumstances if the test suite would stop altogether, rathe...

How to ignore a test within the JUnit test method itself

We have a number of integration tests that fail when our staging server goes down for weekly maintenance. When the staging server is down we send a specific response that I could detect in my integration tests. When I get this response instead of failing the tests I'm wondering if it is possible to skip/ignore that test even though it ...

Testing a (big) collection retrieved from a db

I'm currently doing integration testing on a database and I have the following sql statement: var date = DateTime.Parse("01-01-2010 20:30:00"); var result = datacontext.Repository<IObject>().Where(r => r.DateTime > date).First(); Assert.IsFalse(result.Finished); I need to test if the results retrieved from the statement, where the giv...

How to test the SSIS Packages?

Hi, How to test the SSIS Packages ? what are the things should be taken care while testing the ssis packages? what are the testcase steps should be written while testing ? regards, kumar ...

Best way to mock out external web services while testing a web application in development

Currently I am working on an application which depends on a lot of external web services. A few of them are authorize.net and chargify. When testing(manual testing) things other than the integration with these web services, I replace these web service dependencies with fake versions of them which don't really do anything. The way I am...

Find out which row caused the error

I have a big fat query that's written dynamically to integrate some data. Basically what it does is query some tables, join some other ones, treat some data, and then insert it into a final table. The problem is that there's too much data, and we can't really trust the sources, because there could be some errored or inconsistent data. ...

IntegrationTests - A potentially dangerous Request.Path value was detected from the client

I get this error: A potentially dangerous Request.Path value was detected from the client (?). when this URI: http://www.site.com/%3f. How can I write an integration tests around of all of this type of errors? I want to test against all this erros: A potentially dangerous Request.Path value was detected from the client A potentially ...

IIS Integration testing: remove X-Powered-By: ASP.NET header

I want to have a test that testing the inexistent of this http headers, using NAnt and NUnit: X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Edit: I'm asking hot to actually test this rule: "don't have asp headers". so, I can have this test in each new website that I'm doing, so it make it easier no to forget this simple step. ...

Final Integration Testing for Q.A.

A medium sized rails app that our company has been working on is getting close to the end of development and we are going to start doing Q.A. testing on it. We've have been writing unit, functional and integration tests all along and our test coverage is about 99% (even though that really doesn't mean anything). We feel like we have a ...

VSTSDB Continuous Integration Best Practice: Installing our integration test SQL Server on the same box as TFS Build Agent?

We are beginning to use Visual Studio Database Edition 2010 (VSTSDB) for our continuous integration. In short I have our nightly build creating the Deploy SQL and then running the script on a SQL Server. I will eventually have integration unit tests run on the newly created database(s) after the build is dropped and database is created. ...

IntegrationTests for NHibernate.MappingException: No persister for:

If I forgot to add mappings to a persister object, NHibernate will throw an exception when I'll run the application. I want to write an integration tests, that test that all mappings are provided to NHibernate. what is the way you recommend to follow? ...

What is the best way to test using grails using IDEA?

I am seriously having a very non-pleasant time testing using Grails. I will describe my experience, and I'd like to know if there's a better way. The first problem I have with testing is that Grails doesn't give immediate feedback to the developer when .save() fails inside of an integration test. So let's say you have a domain class wi...

Selenium Test Runner and variables problem

Hi, In my selenium test suite (html), I define a first test case to initialize variable called in the next test case. Sample : In first script : store|//div[@id="myfield"]|myvar In my second script : type|${myvar}|myvalue But when I start test runner (from maven), it returns an error telling that ${myvar} is not found The valu...