vipm-io / vi-tester

VI Tester for LabVIEW
BSD 3-Clause "New" or "Revised" License
28 stars 26 forks source link

Provider new test menu implementation #62

Open kosist opened 3 years ago

kosist commented 3 years ago

Hello @jimkring,

finally I've managed to finalize implementation of feature #59 to some point.

I have added additional project provider, because it was not possible to add this functionality to existing one (due to GUID in .ini file). There is new folder "Add Test Method Provider" in the source code. Overall idea is the following. User right-clicks on the class -> provider checks, whether class has TestCase.lvclass in its hierarchy. If so, then New -> VI Tester Test Method menu entry is added. When this menu item is selected, there is opened window to create new test method. By default, "standard" template is used (which is installed with the toolkit). But user could place his own templates to proper directory, so then he could select that particular template for the test method. For example, someone likes "Given, When, Then" template from VITAC toolkit -> so such template could be stored to "resource\JKI\VI Tester\Templates\Method Templates\Custom" directory, and then it is possible to select it and generate new test method based on that template. Now there is simple validation of the template - it must have "TestCase in" and "TestCase out" input/output of the class datatype. When custom templates are found, they are displayed in the drop-down list. If they are not found, drop-down list is hidden. In order to select custom template from the drop-down list, checkbox "Use Template?" must be selected. Then drop-down list will be enabled, and user could select particular template.

As I understand, package is built using OpenG builder, so I didn't know how to build it... I was copying VIs manually, relinked template methods in order to use TemplateTestClass.lvclass from LabVIEW folder, and tested like that.

Let me, please, describe installation paths for the new files, located in "Add Test Method Provider" folder.

  1. Content of "Provider" folder should be copied to "resource\Framework\Providers\AddTestMethod".
  2. AddTestMethodProvider.ini file should be copied to "resource\Framework\Providers\GProviders" folder.
  3. "test template standard.vi" -> copied to "resource\JKI\VI Tester\Templates\Method Templates\Default\test template standard.vi" path.
  4. Also, there could be created folder "resource\JKI\VI Tester\Templates\Method Templates\Custom" where additional custom method templates could be placed.

Let me, please, ask you to help with package build, so it will be possible to test the implementation in complete setup?

Thank you very much in advance,

hope that implementation is fine...

Sincerely, Ivan.

kosist commented 3 years ago

Hello @jimkring ,

let me please just ask, whether you'll have time in some near future to review this pull request?

Thank you very much,

Sincerely, Ivan.