Application Security, Technology
A company that handles the transactions between two parties (i.e. merchant and customer) is called payment processor. The payment is accomplished by passing on the payment information, like a credit card/debit card, from the customer to the merchant’s preferred bank account. There are several payment processing companies functioning in...
Hi Friends, I always used to spend lot of time writing integration tests as running even a single test involves loading the complete application, which includes loading complete database every time. Then I realized that data which I use for testing is always the same, why can't we restore the database once created, before we run the...
Hi Friends, Recently I needed to access my grails application's path while writing an integration test. I tried to do it with servlet context, Application Holder and few more options. But none worked. Then I encountered the simplest way as given below, which worked. System.properties['base.dir'] Cheers! ~~Amit Jain~~ ...
Hello Friends, I was using Jsecurity plugin in my project. There was an action in a controller which needed logged in user information and I was finding it difficult to write an integration test for the same. Then Brent Fisher shared the following code which worked nicely for both services and controllers: import...
Just thought I would share with you few tips or key points we should remember while writing integration test cases: 1. Flush and clear the session object for every single test case for example class FooTests extends GroovyTestCase { def sessionFactory void setUp() { sessionFactory.currentSession.flush() ...