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.
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:
-- 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.
*** Issue 31981 has been marked as a duplicate of this issue. ***
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
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?
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.
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 ...
OK, I changed name to 'attribs'.
committed to trunk