Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "New -> Test" menu for Test Case classes #59

Open
kosist opened this issue Jan 11, 2021 · 11 comments
Open

Add "New -> Test" menu for Test Case classes #59

kosist opened this issue Jan 11, 2021 · 11 comments

Comments

@kosist
Copy link
Collaborator

kosist commented Jan 11, 2021

Not sure whether it is possible to modify by custom project provider default menus, but the idea is to add to "New" menu of Test Case class new item "Test method" or something - so it will create new test method.

image

Sometimes template test method VI could be removed, or modified so then can not be used for different tests. But as test method is just simple static dispatch VI, it would be more "natural" way of adding test via "New" menu for the test class.

And, that generated new test method could contain some code already - either the same as template test, or "Given, When, Then" template from VITAC toolkit.

@kosist
Copy link
Collaborator Author

kosist commented Jan 21, 2021

@jimkring , would you mind if it will be separate tool?
I might work on this feature, but the question is whether you have time now to build new release of VI Tester. So instead of adding this menus to VI Tester, it could be done and released as separate package which will be dependent on VI Tester, and add new menu item as described above.

@jimkring
Copy link
Contributor

Hi @kosist. Let's add this to the main package. We already have a project provider. I'm happy to help with the build and release.

@kosist
Copy link
Collaborator Author

kosist commented Jan 21, 2021

Thank you @jimkring, then I'll go for it, and create pull request when it will be finalized.

@jimkring
Copy link
Contributor

Sounds great!

@kosist
Copy link
Collaborator Author

kosist commented Jan 23, 2021

@jimkring , let me ask you please about the following. When I open "VI Tester Project Integration.lvproj", there are missing VIs from API folder. Should I place first the whole project to "C:\Program Files (x86)\National Instruments\LabVIEW 2013\resource\Framework\Providers" folder? Because seems that it searches "API" folder one level upper.

image

I've checked .gitignore file, and API folder is not there - so seems that "LabVIEW Project Plugin" was placed to "...\Providers" folder, wasn't it?
I could also relink all API VIs/controls which are missing to new location, but not sure whether it could cause then some issues while building package.

@jimkring
Copy link
Contributor

@kosist this part of LabVIEW development has historically been (and continues to be) a pain.

Starting in LV2012 (I think), the <LabVIEW>\resource folder has been a Symbolic Path, meaning if a VI calls a VI that's located underneath the <LabVIEW>\resource folder, then the caller will save the dependency VIs path relative to <resource>. Based on that, I'm not sure why the linkages are bad, since we're working in LV2013.

I can take a look...

@jimkring
Copy link
Contributor

jimkring commented Jan 24, 2021

Ok, I've sort of figured it out. It's going to be a little strange, but I think we'll get it working.

For now, let's ignore the LabVIEW Project file.

First, I've committed some changes to the master branch.

  • Separated compiled code from the project provider
  • Removed some dead code inside diagram disabled structures

Second, lets do your development in a feature branch named Provider-New-Test-Menu. We can then merge into master once it's ready.

Finally, I verified that I can run the provider from source code and build it.

I've documented how you can do this, here:

https://github.com/JKISoftware/JKI-VI-Tester/wiki/VI-Tester-Development-Guide

For starters, see if you're able to load the project provider from source code. This will enable to you do development.

Thanks and let me know how it goes.

@kosist
Copy link
Collaborator Author

kosist commented Jan 24, 2021

Thanks a lot!
Now dependencies are correct - I've placed also VIs and ini file to Providers... folder, and Project Provider was loaded properly.
Just, I didn't see items in Tools menu - so going to check why it is not there... Things are not so easy than it seemed before )))

@jimkring
Copy link
Contributor

That's great that it seems to be working.

As for the Tools menu, one thought that I have is that maybe you didn't first install the built VI Tester package (e.g. the latest in VIPM) into LabVIEW 2013 -- this as in the instructions for development of the project provider state, as an early/first step.

Doing this step should put the tools menu items in the right spot. Then, in a subsequent step, you delete the installed project provider and put your provider source code in its place.

Hope that helps. Yes, it's not so easy :)

@kosist
Copy link
Collaborator Author

kosist commented Jan 24, 2021

Sorry, my fault - I wasn't aware about developer's guide... Now I see ))
Thanks a lot!
Btw, there is issue with installing of latest VI Tester package via VIPM (v3.0.0.294-1), I'll post issue about it... Previous build (v3.0.0.292-1) works fine.

@jimkring
Copy link
Contributor

jimkring commented Jan 24, 2021

No problem. Yes, the Developer's Guide is quite long and very detailed, since there are lots of ways to get things to not work properly :))

Glad you're you're figuring it out.

Regarding the installation issues with the latest package, yes, please let me know about any issues and probably we can fix that, in this next next release 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants