This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 83812 - limit time of running of one test run
Summary: limit time of running of one test run
Status: CLOSED WONTFIX
Alias: None
Product: qa
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: ehucka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-30 15:22 UTC by ehucka
Modified: 2011-02-17 09:35 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ehucka 2006-08-30 15:22:10 UTC
Execution time of one testrun should be limited. Deadlocks in tested software
should not block other testruns for a long time.
Comment 1 ehucka 2006-12-07 15:33:00 UTC
I think the watching of tests duration should be more detailed.
Jirko, is it possible to get something like estimated tests numbers during
running testrun from xtest logs?

Test4u can wait shorter time than e.g. 8 hours for whole testrun but only 1 hour
for one test.
Comment 2 Jiri Skrivanek 2006-12-07 16:27:05 UTC
It is hard to estimate number of test cases because they can be generated in
runtime. Maybe you can touch log file in results/testrun_061207-053207/logs. It
should be modified at least every 40 minutes because there is the xtest.timeout
set to 40 minutes and it is applied to every testbag.
Comment 3 Marian Mirilovic 2006-12-07 19:24:29 UTC
Eman, 
this could help us very much. I guessed this has been already implemented, at
least we were speaking about it some time (like 4-6 months) ago and I thought
you said it will be in the version we are currently using. 

I think there are two ways :
1. do some estimation from the history data (JetBrain's  Teamcity is working
this way)
2. let users to set the limit by their own
Comment 4 Jiri Skrivanek 2006-12-08 07:02:26 UTC
ad 2. XTest allows to set a limit for a testbag
http://xtest.netbeans.org/xtest_config.html#timeout.
Comment 5 ehucka 2006-12-08 10:12:25 UTC
I'm sorry, I forgot for this.

ad 1, it is not sure there is always some history data for each testrun, it
would be good to know estimated number of tests and set the timeout by this number

ad 2, It is possible by some advanced option but for whole testrun

I prefer to specify a common timeout for each testbag because there is started
ide for each testbag.

Jirko, is it possible to propagate the testbag timeout to all testbagsd from
some xtest property?
It will be better to kill running testbag from inside the xtest. Test4u can kill
only whole xtest process - it kills not started testbags too.

If it is not possible I will implement some user defined timeout for each
testrun. This option will be preset by some default value what I will find out
by a research.
Comment 6 pzajac 2006-12-08 10:39:03 UTC
Jirko, can you create java.util.logging.Logger? For example with name
"org.netbeans.xtest.TestStats"

It will log message with FINE level:
Module  <name,testtype> start
TestBag <name> start
TestCase <name> start
TestCase <name> end
TestBag <name> end
Module <name,end> end

Eman then can register his own Handler to trace test run.
 
Comment 7 Jiri Skrivanek 2006-12-08 10:59:00 UTC
xtest.timeout is used for every testbag if timeout is not defined explicitely
for testbag in cfg file. And XTest kills test execution if timeout expires.

I can add Logger to XTest. But Test4U has to connect to JVM to register Handler.
Isn't it a problem?
Comment 8 pzajac 2006-12-08 11:26:31 UTC
Hm, yes that's problem. To create another one property for xtest is not good
idea.  There are too many properties now. But it's one solution how to monitor
test run. 
Comment 9 ehucka 2006-12-08 12:46:07 UTC
I can parse periodically some log file, e.g. xmlresults/testreport.xml. 
I will create another option for testrun - 'testbag timeout'. It will be in some
'advanced options' section. There will be set xtest.timeout xtest property by
this value and test4u will check the timeout externaly too - by
xmlresults/testreport.xml file content.
Comment 10 Marian Mirilovic 2009-07-07 14:11:40 UTC
too old -> wontfix