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.
For PHP, it is quite difficult to use the new TestCreatorProvider API/SPI. What is needed but currently not possible: (1) PHPUnit constant is wrong, there are 4 different PHP testing providers in the build --> I will change it to just "PHP" (2) the lifecycle of the TestCreatorConfigurationProvider.getConfigurationPanel() is not clear - when exactly is it created? Displayed? Closed? For what project/file is it created? And how can I save any values if users click OK? IMHO there should be something like: ConfigPanel createConfigPanel(Context, Project/FileObject) - not sure if Context is needed, do not get what it is good for and ConfigPanel should have methods like: void init() - called when displayed void save() - called when OK button is clicked void cancel() - called when Cancel button is clicked (3) when is TestCreatorConfigurationProvider.getMessagePanel() called? What is its purpose? (4) field "Class Name" does not make sense since not all PHP testing providers creates them. Ideally, allow to hide this field completely. UI glitches: (5) if dialog is resized, the components do not behave correctly Thanks.
(In reply to Tomas Mysik from comment #0) > (1) PHPUnit constant is wrong, there are 4 different PHP testing providers > in the build > --> I will change it to just "PHP" BTW, when I changed the displayName in @Registration, the dialog was completely broken...
(In reply to Tomas Mysik from comment #0) > For PHP, it is quite difficult to use the new TestCreatorProvider API/SPI. > What is needed but currently not possible: > > (1) PHPUnit constant is wrong, there are 4 different PHP testing providers > in the build > --> I will change it to just "PHP" I see the change in name. If I have at least one testing provider selected in project properties I also see a label notifying me what kind of test will be created. What do you mean by completely broken in comment 2? > (2) the lifecycle of the > TestCreatorConfigurationProvider.getConfigurationPanel() is not clear - when > exactly is it created? Displayed? Closed? For what project/file is it > created? And how can I save any values if users click OK? IMHO there should > be something like: > > ConfigPanel createConfigPanel(Context, Project/FileObject) - not sure if > Context is needed, do not get what it is good for > > and ConfigPanel should have methods like: > void init() - called when displayed > void save() - called when OK button is clicked > void cancel() - called when Cancel button is clicked I think you do not need to really care about these things as the lifecycle is supposed to be handled by org.netbeans.modules.gsf.testrunner.ui.CommonTestsCfgOfCreate class. You only need to implement TestCreatorConfigurationProvider. Specifically getConfigurationPanel, getSourceAndTestClassNames and getTestSourceRoots will be called when panel is displayed and persistConfigurationPanel will be called when user clicks OK button and you need to save any values. Does this make sense? > > (3) when is TestCreatorConfigurationProvider.getMessagePanel() called? What > is its purpose? not called from anywhere. No purpose at this time. Should not be there at all. messagePanel is used to display error messages related to test case name etc and has nothing to do with configuration panel. > (4) field "Class Name" does not make sense since not all PHP testing > providers creates them. Ideally, allow to hide this field completely. will add the feature of hiding the field. By default it will be shown. > > UI glitches: > (5) if dialog is resized, the components do not behave correctly > > Thanks.
(In reply to Theofanis Oikonomou from comment #2) > What do you mean by completely broken in comment 2? I changed "displayName" of the @Registration from PHP_UNIT constant to string "PHP" -> my provider was not in dialog. Apparently, it is more than just display name, right? ;) > Does this make sense? Maybe I am missing something but the provider is registered in the lookup, right? It means that it is a singleton. So, in such case, it should not have any internal state. How can I save the config panel if I don't have it? The persistConfigurationPanel() has only Context parameter, no panel anywhere. Please, do not tell me that I should remember it in some field, that is not the correct solution (but hack ;) althougth currently the only way how to do it, see PhpTestCreatorConfigurationProvider (I need a project for which getConfigurationPanel() method is called but I know nothing). > not called from anywhere. OK, I see. > will add the feature of hiding the field. By default it will be shown. Perfect, will work for me. Thanks!
Changeset: 2d262abe62eb Author: Theofanis Oikonomou <theofanis@netbeans.org> Date: 2015-07-17 17:20 Message: fixing point 4 from comment 1.
closed it by accident...
Integrated into 'main-silver', will be available in build *201507190001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/2d262abe62eb User: Theofanis Oikonomou <theofanis@netbeans.org> Log: fixing point 4 from comment 1. Task #253523 - TestCreatorProvider API/SPI difficult to use
(In reply to Tomas Mysik from comment #3) > Please, do not tell me that I should remember it in some field, that is not > the correct solution (but hack ;) althougth currently the only way how to do > it, see PhpTestCreatorConfigurationProvider (I need a project for which > getConfigurationPanel() method is called but I know nothing). OK, apparently this does not work reliably - see issue #253565. Thanks.
(In reply to Quality Engineering from comment #6) > Log: fixing point 4 from comment 1. Again, showClassNameInfo() method does not take any parameter (FileObject or better Project) - _how_ can I return a correct value? What if we add a support for PHP testing framework which _can_ specify the target test class name? How can I, as a client of this API, decide for which project is my implemetation _currently_ called? Thanks.
Just found out: (6) Allow to hide also the source class name since it is optional as well (one can simply test just some function, not any class). Thanks.
Changeset: bb12f041683f Author: Theofanis Oikonomou <theofanis@netbeans.org> Date: 2015-07-23 16:48 Message:
Changeset: 98fcc8c86d4a Author: Theofanis Oikonomou <theofanis@netbeans.org> Date: 2015-07-23 18:00 Message: fix for comment 9
Should be easier now :)
Integrated into 'main-silver', will be available in build *201507240001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/bb12f041683f User: Theofanis Oikonomou <theofanis@netbeans.org> Log: Task #253523 - TestCreatorProvider API/SPI difficult to use
Changeset: 292fd5cd05c5 Author: Theofanis Oikonomou <theofanis@netbeans.org> Date: 2015-07-24 14:49 Message: introduce @Registration identifier in TestCreatorProvider
Integrated into 'main-silver', will be available in build *201507250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/292fd5cd05c5 User: Theofanis Oikonomou <theofanis@netbeans.org> Log: introduce @Registration identifier in TestCreatorProvider Task #253523 - TestCreatorProvider API/SPI difficult to use
Changeset: ccbc5a52b796 Author: Theofanis Oikonomou <theofanis@netbeans.org> Date: 2015-08-20 13:33 Message: added methods to check validity of configuration panel
Integrated into 'main-silver', will be available in build *201508210002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/ccbc5a52b796 User: Theofanis Oikonomou <theofanis@netbeans.org> Log: added methods to check validity of configuration panel Task #253523 - TestCreatorProvider API/SPI difficult to use