09-06-2019 03:19 PM
Hello,
I have been playing around with my own unit tester for a few years and NI has accepted it to be on the LabVIEW tools network.
This is a very basic unit tester. I made it mostly for myself because I didn't like the existing Unit test tools out there. My unit tester is meant to be fast and very easy to use.
Thanks
09-08-2019 05:01 PM
I checked it out. Very nice Dan!
Question: Is there any way to run the tests programmatically?
09-09-2019 04:05 AM
@ASTDan wrote:
This is a very basic unit tester. I made it mostly for myself because I didn't like the existing Unit test tools out there. My unit tester is meant to be fast and very easy to use.
Hi Dan,
can you elaborate on what exactly you didn't like about the other tools? As I can see the main idea is that your tool detects test files based on "AST_Unit_Test" hashtags and these VIs can talk to AST via a result Boolean and an error outputs. I don't yet see why this cannot be covered by other unit testing tools available for LabVIEW.
By the way, I tried AST and I found the following bugs or I used it in an unintended manner:
Best,
Peter
09-09-2019 08:09 AM
Hello Peter,
The main reason I developed my unit tester was speed. At the time NI UTF and JKI VI tester were very slow (they may be faster now). I wanted a tool that was much faster. I also wanted something that didn't create files that only the unit test tool could read. I was distributing code to my customers and they would have to install NI UTF or JKI VI tester. Finally I wanted to be able to run my tests outside the framework. This was mainly when I was developing the test. I wanted to get very fast feedback if my test passed or failed. I admit my unit tester doesn't have nearly all the features of other unit testers out there. However my hope is that it is the easiest to use and learn.
Regarding the error. You have to have the VI in the project and it should begin with the name "Test"
Thanks
09-09-2019 08:10 AM
09-09-2019 08:35 AM
@ASTDan wrote:
Hello Peter,
The main reason I developed my unit tester was speed. At the time NI UTF and JKI VI tester were very slow (they may be faster now). I wanted a tool that was much faster.
That's a totally valid argument for UTF. It is slow. But VI Tester is fairly fast given that it has an API to programmatically iterate over unit tests (which comes with overhead, for sure). Btw, we recently created this benchmark which specifically targets the time performance of unit testing tools for LabVIEW: https://github.com/IncQueryLabs/LabVIEW-knowledge-base/wiki/Unit-testing-tools-benchmark-and-DQMH-ex...
I can imagine that AST would be as fast as Caraya as you don't have API overhead either. But as you can see, the difference is marginal, VI Tester and InstaCoverage are very fast, at least for human usage.
@I also wanted something that didn't create files that only the unit test tool could read. I was distributing code to my customers and they would have to install NI UTF or JKI VI tester. Finally I wanted to be able to run my tests outside the framework. This was mainly when I was developing the test.
I see your point, I guess. For UTF and VI Tester, it's the tool which puts together the "harness" (setup, VI under test, teardown) during the execution. It's not the case with InstaCoverage though where the harness generated by the tool can be executed using native LabVIEW.
Regarding the error. You have to have the VI in the project and it should begin with the name "Test"
I just tried adding a new test called "Test 2" and I'm still getting the error (see screenshot). Am I missing something?
Peter
09-09-2019 10:40 AM
Hello Peter,
VI tester speed may have improved since the last time I used it. It has been a while since I used it. I have been using my own tool for a few years now. I haven't tried Caraya, it came out around the time I developed mine.
I can't seem to reproduce the error. I try to add a VI and I don't get that error. Is the VI at the path listed in the error? Do you have some kind of windows protection on that folder?
Sorry for the error.
09-10-2019 02:51 AM
All I can see is on the screenshot I attached. I shouldn't have any protection on the folder. I can create tests manually, from your template, and also run them. It's only the "Add" function on the GUI which throws the error. Btw, after this error Run Tests/Run Test doesn't work either.
09-10-2019 09:42 AM
09-11-2019 02:45 AM
Hi Dan,
I like your toolkit, very easy to use!
Is there a way to get the Error Out information in a report/GUI?