|
Why the performances (in sense of time) of my application are so different
between normal run and test? I'd need to measure my app performances (as time) during testing, but it seems not to reliable.. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Which kind of tests are you thinking of? Integration? Functional?
Do you have an example of a use case that takes significantly more time in test mode? Antoine On Tue, May 29, 2012 at 5:09 PM, QuantumUniverses <[hidden email]> wrote: Why the performances (in sense of time) of my application are so different between normal run and test? |
|
I would also add that you can use the -war option to run the application in a more production like mode.
Finally, I think I'd prefer to deploy a specially prepared war and then run tests from a separate suite than the ones in grails to ensure I can test on a production like server environment rather than my laptop. On 29 May 2012, at 19:32, Antoine Roux wrote: Which kind of tests are you thinking of? Integration? Functional? |
|
In reply to this post by Antoine Roux
They’re integration tests and have the classic Grails test structure:
class MyTests extends GroovyTestCase {
static transactional = false
def myController = new MyController()
def mydataService
protected void setUp() {
super.setUp()
myController.mydataService =
mydataService
}
protected void tearDown() {
super.tearDown()
}
void testGeneration() {
// my code
}
}
"Antoine Roux" <[hidden email]> ha scritto nel
messaggio
news:[hidden email]... Which
kind of tests are you thinking of? Integration? Functional? Do you have an example of a use case that takes significantly more time in test mode? Antoine On Tue, May 29, 2012 at 5:09 PM, QuantumUniverses <[hidden email]> wrote:
Why the performances (in sense of time) of my application are so different between normal run and test? |
|
In reply to this post by Sebastian Gozin
What do you mean exactly with -war option? Can I execute my app by STS
specifing it runs as a war or something like this?
I can produce the .war file and place it into my web app so it can run
under Tomcat, anyway for me it’s enough it can run by STS and measure the
performances (time).
"Sebastian Gozin" <[hidden email]> ha scritto nel
messaggio
news:[hidden email]... I
would also add that you can use the -war option to run the application in a more
production like mode.
Finally, I think I'd prefer to deploy a specially prepared war and then run
tests from a separate suite than the ones in grails to ensure I can test on a
production like server environment rather than my laptop.
On 29 May 2012, at 19:32, Antoine Roux wrote: Which kind of tests are you thinking of? Integration? Functional? |
|
Integration tests have a different setup than you production environment: each test runs inside a transaction, and the transaction is rolled back after each test. This could add latence, depending on how you measure performance.
Also, the application is running with all the infrastructure of running the application from the grails command. This could consume more memory. On Wed, May 30, 2012 at 9:11 AM, QuantumUniverses <[hidden email]> wrote:
|
|
I used transactional=false so that no rollback should be done, and the
situation is near the production one.
Also I can’t explain why there’s a so big difference between the
performances of STS launch and JUnit test launch (2 minutes Vs 15
minutes).
You say the app is running with all the infrastructure.. yes, in fact I
eventually expect better performances with integration tests than STS ones!
"Antoine Roux" <[hidden email]> ha scritto nel
messaggio
news:CAJZe56Z=[hidden email]... Integration
tests have a different setup than you production environment: each test runs
inside a transaction, and the transaction is rolled back after each test. This
could add latence, depending on how you measure performance. Also, the application is running with all the infrastructure of running the application from the grails command. This could consume more memory. On Wed, May 30, 2012 at 9:11 AM, QuantumUniverses <[hidden email]> wrote:
|
| Powered by Nabble | Edit this page |
