Hi Forum,
I'm running tests using: ant run-single-test-suite ... The environment to run the tests take ages to startup. It makes writing and running tests painful! Is there anyway to reduce this time? Many thanks, Chris |
Does anyone have a view on this? Maybe I just need a faster laptop?
snowch wrote: > Hi Forum, > > I'm running tests using: > > ant run-single-test-suite ... > > The environment to run the tests take ages to startup. It makes > writing and running tests painful! > > Is there anyway to reduce this time? > > Many thanks, > > Chris |
Running a single test suite typically takes me about a minute or two,
so unless that's what you mean by "ages" then yes, you need a faster laptop :-) Regards Scott HotWax Media http://www.hotwaxmedia.com On 15/01/2010, at 9:08 AM, snowch wrote: > Does anyone have a view on this? Maybe I just need a faster laptop? > > snowch wrote: >> Hi Forum, >> >> I'm running tests using: >> >> ant run-single-test-suite ... >> >> The environment to run the tests take ages to startup. It makes >> writing and running tests painful! >> >> Is there anyway to reduce this time? >> >> Many thanks, >> >> Chris > smime.p7s (3K) Download Attachment |
Scott,
Does you cycle follow something like this?: Start Obiz Do some development Stop Ofbiz Run Tests Anyway, a couple of minutes seems like a long time for a test suite. If the tests could be run against an already running ofbiz, this time could be much reduced? Many thanks, Chris Scott Gray wrote: > Running a single test suite typically takes me about a minute or two, > so unless that's what you mean by "ages" then yes, you need a faster > laptop :-) > > Regards > Scott > > HotWax Media > http://www.hotwaxmedia.com > > On 15/01/2010, at 9:08 AM, snowch wrote: > >> Does anyone have a view on this? Maybe I just need a faster laptop? >> >> snowch wrote: >>> Hi Forum, >>> >>> I'm running tests using: >>> >>> ant run-single-test-suite ... >>> >>> The environment to run the tests take ages to startup. It makes >>> writing and running tests painful! >>> >>> Is there anyway to reduce this time? >>> >>> Many thanks, >>> >>> Chris >> > |
I don't generally start OFBiz to do some development unless I'm
playing around with the UI, the usual process is: Write some code Run some tests Start OFBiz and manually test if needed Commit As a percentage of my day tests would take at most maybe 5% which I don't really consider excessive and I don't feel the need to sit there and stare at the console while the tests run. It should be possible to run a test suite against an already running instance, assuming no compilation is required and the database is in the state required by the tests (i.e. pretty much unchanged from a fresh install). Regards Scott On 15/01/2010, at 9:24 AM, snowch wrote: > Scott, > > Does you cycle follow something like this?: > > Start Obiz > Do some development > Stop Ofbiz > Run Tests > > Anyway, a couple of minutes seems like a long time for a test > suite. If the tests could be run against an already running ofbiz, > this time could be much reduced? > > Many thanks, > > Chris > > Scott Gray wrote: >> Running a single test suite typically takes me about a minute or >> two, so unless that's what you mean by "ages" then yes, you need a >> faster laptop :-) >> >> Regards >> Scott >> >> HotWax Media >> http://www.hotwaxmedia.com >> >> On 15/01/2010, at 9:08 AM, snowch wrote: >> >>> Does anyone have a view on this? Maybe I just need a faster laptop? >>> >>> snowch wrote: >>>> Hi Forum, >>>> >>>> I'm running tests using: >>>> >>>> ant run-single-test-suite ... >>>> >>>> The environment to run the tests take ages to startup. It makes >>>> writing and running tests painful! >>>> >>>> Is there anyway to reduce this time? >>>> >>>> Many thanks, >>>> >>>> Chris >>> >> > smime.p7s (3K) Download Attachment |
Ah, my in-experience is showing - I normally have ofbiz running during
development to check data, etc. Perhaps I should have two instances, one for playing with through the UI, the other for testing. Many thanks for the feedback! Scott Gray wrote: > I don't generally start OFBiz to do some development unless I'm > playing around with the UI, the usual process is: > Write some code > Run some tests > Start OFBiz and manually test if needed > Commit > > As a percentage of my day tests would take at most maybe 5% which I > don't really consider excessive and I don't feel the need to sit there > and stare at the console while the tests run. > > It should be possible to run a test suite against an already running > instance, assuming no compilation is required and the database is in > the state required by the tests (i.e. pretty much unchanged from a > fresh install). > > Regards > Scott > > On 15/01/2010, at 9:24 AM, snowch wrote: > >> Scott, >> >> Does you cycle follow something like this?: >> >> Start Obiz >> Do some development >> Stop Ofbiz >> Run Tests >> >> Anyway, a couple of minutes seems like a long time for a test suite. >> If the tests could be run against an already running ofbiz, this time >> could be much reduced? >> >> Many thanks, >> >> Chris >> >> Scott Gray wrote: >>> Running a single test suite typically takes me about a minute or >>> two, so unless that's what you mean by "ages" then yes, you need a >>> faster laptop :-) >>> >>> Regards >>> Scott >>> >>> HotWax Media >>> http://www.hotwaxmedia.com >>> >>> On 15/01/2010, at 9:08 AM, snowch wrote: >>> >>>> Does anyone have a view on this? Maybe I just need a faster laptop? >>>> >>>> snowch wrote: >>>>> Hi Forum, >>>>> >>>>> I'm running tests using: >>>>> >>>>> ant run-single-test-suite ... >>>>> >>>>> The environment to run the tests take ages to startup. It makes >>>>> writing and running tests painful! >>>>> >>>>> Is there anyway to reduce this time? >>>>> >>>>> Many thanks, >>>>> >>>>> Chris >>>> >>> >> > |
In reply to this post by Scott Gray-2
I'm lovin the test framework, but I'm still finding the startup time to be a pain. What would need to be done to run the tests against an already running instance? Many thanks, Chris |
You could try manually initializing and starting the TestRunContainer, but obviously changes to java files will only take effect after you recompile.
Let me know how it goes, there is potential that we could put something like this into webtools alongside the selenium tests. Regards Scott HotWax Media http://www.hotwaxmedia.com On 23/01/2010, at 11:41 AM, chris snow wrote: > > > Scott Gray-2 wrote: >> >> It should be possible to run a test suite against an already running >> instance, assuming no compilation is required and the database is in >> the state required by the tests (i.e. pretty much unchanged from a >> fresh install). >> > > I'm lovin the test framework, but I'm still finding the startup time to be a > pain. What would need to be done to run the tests against an already > running instance? > > Many thanks, > > Chris > > -- > View this message in context: http://n4.nabble.com/tests-are-slow-tp1014608p1288334.html > Sent from the OFBiz - User mailing list archive at Nabble.com. smime.p7s (3K) Download Attachment |
Thanks Scott - I will take a look on Monday when back in the office.
Scott Gray wrote: > You could try manually initializing and starting the TestRunContainer, but obviously changes to java files will only take effect after you recompile. > > Let me know how it goes, there is potential that we could put something like this into webtools alongside the selenium tests. > > Regards > Scott > > HotWax Media > http://www.hotwaxmedia.com > > |
In reply to this post by Scott Gray-2
Hi Scott,
That works great - much quicker! I have started up the normal container and I have created a service (runTestSuite) that instantiates the TestRunContainer. The service is marked as exported, so I am just running the tests via a SOAP call at the moment. This functionality would be good in webtools. It would also be good if a test could be executed against a running ofbiz via the main build ant script. Using ant, we could easily run tests from eclipse by creating an external run task for each test. Shall I raise this as a JIRA improvement? Many thanks, Chris Scott Gray wrote: > You could try manually initializing and starting the TestRunContainer, but obviously changes to java files will only take effect after you recompile. > > Let me know how it goes, there is potential that we could put something like this into webtools alongside the selenium tests. > > Regards > Scott > > HotWax Media > http://www.hotwaxmedia.com > > On 23/01/2010, at 11:41 AM, chris snow wrote: > > >> Scott Gray-2 wrote: >> >>> It should be possible to run a test suite against an already running >>> instance, assuming no compilation is required and the database is in >>> the state required by the tests (i.e. pretty much unchanged from a >>> fresh install). >>> >>> >> I'm lovin the test framework, but I'm still finding the startup time to be a >> pain. What would need to be done to run the tests against an already >> running instance? >> >> Many thanks, >> >> Chris >> >> -- >> View this message in context: http://n4.nabble.com/tests-are-slow-tp1014608p1288334.html >> Sent from the OFBiz - User mailing list archive at Nabble.com. >> > > |
Hi Chris,
You're most welcome to create a jira issue, I can't guarantee I'll be able to work on it anytime soon however. Regards Scott On 25/01/2010, at 6:53 AM, Chris Snow wrote: > Hi Scott, > > That works great - much quicker! > > I have started up the normal container and I have created a service (runTestSuite) that instantiates the TestRunContainer. The service is marked as exported, so I am just running the tests via a SOAP call at the moment. > > This functionality would be good in webtools. It would also be good if a test could be executed against a running ofbiz via the main build ant script. Using ant, we could easily run tests from eclipse by creating an external run task for each test. > > Shall I raise this as a JIRA improvement? > > Many thanks, > > Chris > > > Scott Gray wrote: >> You could try manually initializing and starting the TestRunContainer, but obviously changes to java files will only take effect after you recompile. >> >> Let me know how it goes, there is potential that we could put something like this into webtools alongside the selenium tests. >> >> Regards >> Scott >> >> HotWax Media >> http://www.hotwaxmedia.com >> >> On 23/01/2010, at 11:41 AM, chris snow wrote: >> >> >>> Scott Gray-2 wrote: >>> >>>> It should be possible to run a test suite against an already running instance, assuming no compilation is required and the database is in the state required by the tests (i.e. pretty much unchanged from a fresh install). >>>> >>>> >>> I'm lovin the test framework, but I'm still finding the startup time to be a >>> pain. What would need to be done to run the tests against an already >>> running instance? >>> >>> Many thanks, >>> >>> Chris >>> >>> -- >>> View this message in context: http://n4.nabble.com/tests-are-slow-tp1014608p1288334.html >>> Sent from the OFBiz - User mailing list archive at Nabble.com. >>> >> >> > smime.p7s (3K) Download Attachment |
Free forum by Nabble | Edit this page |