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 141119 - Should be possible to hook the UI test runner into custom tasks
Summary: Should be possible to hook the UI test runner into custom tasks
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Testing (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords:
: 142587 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-22 09:27 UTC by Erno Mononen
Modified: 2008-08-26 17:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erno Mononen 2008-07-22 09:27:01 UTC
Currently the UI test runner gets invoked only for standard test tasks, such as test, spec, test:units etc. There 
should be an option in the Rake runner to use the UI test runner for whatever task (that uses Rake's TestTask).
Comment 1 Erno Mononen 2008-08-01 16:25:26 UTC
*** Issue 142587 has been marked as a duplicate of this issue. ***
Comment 2 Martin Krauskopf 2008-08-01 16:40:10 UTC
> There should be an option in the Rake runner to use the UI test runner for whatever task

This is not something to be decided by the user, but by Test Runner. I know we talked about this, but likely I
misunderstood or I misunderstand now, since there seems to be no reason for providing explicit UI options. Is there any
technical barrier why instances of Rake::TestTask cannot be detected?
It could likely be done during all Rake tasks detection and those particular tasks would be marked as 'test' tasks which
would then be utilized by Test Runner infrastructure.
Comment 3 Martin Krauskopf 2008-08-01 17:05:53 UTC
I'm recalling our discussion now..... so if there is not enough time to implement this, even not the explicit UI way,
what about to implement something in the properties file. Like

  test.tasks=test_all,test_unit,test_functional

what could users add and test runner would read/check. Should be likely easiest way (in case there is not time for
fully-fledged solution). I would like to have at least some way for 6.5.
Comment 4 Erno Mononen 2008-08-25 15:29:12 UTC
Probably will implement the properties based approach as discussed. Separate properties for spec and test/unit are 
likely needed.
Comment 5 Erno Mononen 2008-08-26 12:45:14 UTC
Fixed, 68c0fa077d8f in main.

The test runner now checks for project.properties (and/or private.properties) for the following properties:

'test.tasks' for test/unit tests
'spec.tasks' for rspec tests

If those properties are not defined, the test runner will run by default the following tasks:

'test' and all tasks starting with 'test:' for test/unit
'spec' for rspec

So to define additional tasks for the test runner, put something like the following either to project.properties or 
private.properties:

test.tasks=test,my_tests,yet_another_test_task
spec.tasks=spec,my_test_specs

If you define the property but leave the value empty, no tasks will be associated with the test runner. So if you for 
some reason don't want to run any tasks through the test runner, you can do:

test.tasks=
spec.tasks=
Comment 6 Quality Engineering 2008-08-26 17:23:05 UTC
Integrated into 'main-golden', available in build *200808261401* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/68c0fa077d8f
User: Erno Mononen <emononen@netbeans.org>
Log: #141119: Should be possible to hook the UI test runner into custom tasks