Unit Testing Group

Highlighted

AST Unit Tester on NI Tools Network

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.

 

AST Unit Tester

 

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

Dan Shangraw, P.E.


Download AST Unit Tester


 

Message 1 of 14
(213 Views)
13 REPLIES 13

Re: AST Unit Tester on NI Tools Network

I checked it out.  Very nice Dan! 

 

Question: Is there any way to run the tests programmatically? 

Sam Taggart
CLA, CPI, LabVIEW Champion
DQMH Trusted Advisor
automatedenver.com
0 Kudos
Message 2 of 14
(163 Views)

Re: AST Unit Tester on NI Tools Network


@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:

  • Failed to add new test via GUI (see first screenshot).
  • Variant error message while executing newly created unit test from template (second screenshot).

Best,

 

Peter

0 Kudos
Message 3 of 14
(139 Views)

Re: AST Unit Tester on NI Tools Network

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

Dan Shangraw, P.E.


Download AST Unit Tester


 

0 Kudos
Message 4 of 14
(108 Views)

Re: AST Unit Tester on NI Tools Network

Hello Sam,

 

No there isn't a way to call the unit tester programmatically.

 

Thanks 

Dan Shangraw, P.E.


Download AST Unit Tester


 

0 Kudos
Message 5 of 14
(104 Views)

Re: AST Unit Tester on NI Tools Network


@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

0 Kudos
Message 6 of 14
(99 Views)

Re: AST Unit Tester on NI Tools Network

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.

Dan Shangraw, P.E.


Download AST Unit Tester


 

0 Kudos
Message 7 of 14
(88 Views)

Re: AST Unit Tester on NI Tools Network

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.

0 Kudos
Message 8 of 14
(71 Views)

Re: AST Unit Tester on NI Tools Network

Hmmm.  I still can't seem to reproduce the error.  Can you use Windows explorer and verify the file is at the location?  This is very strange...

 

Thanks

Dan Shangraw, P.E.


Download AST Unit Tester


 

0 Kudos
Message 9 of 14
(62 Views)

Re: AST Unit Tester on NI Tools Network

Hi Dan,

 

I like your toolkit, very easy to use!

Is there a way to get the Error Out information in a report/GUI?

 

 

 

 

Nikita Prorekhin
CLA
0 Kudos
Message 10 of 14
(46 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.