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 31980 - allow more flexible test lists
Summary: allow more flexible test lists
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: xtest (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: L Martinek
URL:
Keywords:
: 31981 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-13 16:04 UTC by Martin Brehovsky
Modified: 2003-04-24 15:53 UTC (History)
0 users

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 Martin Brehovsky 2003-03-13 16:04:31 UTC
It would be great if XTest could support more
advanced test list. Let me show an example:

<testbag name="mytestbag" testattribs="validation"
execuor="myexecuttor" compiler="mycompiler">
  <testset dir="mytestset">
    <patternset>
      <include name="test1.class"/>       
    </patterset>
    <patternset attribs="i386">
       <include name="test2.class"/>
    </patternset>
    <patternset attribs="localized">
       <include name="test3.class"/>
    </patternset>
    <patternset attribs="i386,localized">
       <include name="test4.class"/>
    </patternset>
  </testset>
</testbag>

The pattern attribs would have to be selected via
additional property when tests are run - e.g. ant
-Dxtest.attribs=validation
-Dxtest.pattern.attribs=i386,!localized

The most important advance of this approach to
current attribtues is:
Comment 1 Martin Brehovsky 2003-03-13 16:16:16 UTC
-- oops - something went wrong - here's the continuation:

- in the patternset they specify only presence of the attributes (no
logical operatiors should be allowed)
- when selecting tests to run, users can demand to run only tests
which present attribute (they specify it in a property - e.g.
xtest.pattern.attribs=i386) or only tests which does not contain the
attribute (they specify the negation of the attribute
xtest.pattern.attribs=!i386) or any combination. If the property
xtest.patter.attribs is not set, all tests should be run.
Comment 2 Martin Brehovsky 2003-03-13 16:43:18 UTC
*** Issue 31981 has been marked as a duplicate of this issue. ***
Comment 3 L Martinek 2003-04-01 16:11:27 UTC
Fixed in private branch, will be merged later.

Patternset can have attribute 'patternattribs'. To execute tests with
specified attribs set property 'xtest.pattern.attribs'.

<patternset patternattribs="i386">
    <include name="test1.class"/>
</patternset>

ant -Dxtest.pattern.attribs=i386
Comment 4 Martin Brehovsky 2003-04-01 16:18:15 UTC
Since the attributes are of patternset, I think they should use rather
'xtest.patternset.attribs' property than the originaly suggested
'xtest.pattern.attribs'. 

I also liked more the original way of defintion of attribtues in the
patternset - so rather '<patternset attribs="i386">' than '<patternset
patternattribs="i386">'.

Do you think it would be possible to do the proposed changes?
Comment 5 L Martinek 2003-04-01 16:25:01 UTC
I agree, I will change xtest.pattern.attribs to xtest.patternset.attribs.

Regarding name of patternset attribute, I intentionally used
'patternattribs' instead of 'attribs' to highlight that it's something
completely different then testbag's attributes.
Comment 6 Martin Brehovsky 2003-04-01 16:28:45 UTC
I don't think it needs to be differentiated by this in the case of
XML. It's actually the hierarchical structure of XML tags, which
already do the difference - so it should be clear enough to any user
that the attributes defined in patternset are specific to that
particular patternset.

Bacuse of this we might also consider to change the 'xtest.attribs'
property to something like 'xtest.testbag.attribs' - this would make
the attribs usage more clear ...
Comment 7 L Martinek 2003-04-04 09:25:15 UTC
OK, I changed name to 'attribs'.
Comment 8 L Martinek 2003-04-24 15:53:44 UTC
committed to trunk