05-19-2017 02:12 PM
Hey folks,
I have some integrated tests for my LabVIEW web service that involve deploying a built executable with the web service, issuing requests, and verifying the responses. However, it would be desirable to catch issues earlier by leveraging unit tests, specifically using VI Tester.
I tried the most obvious unit test I could think of:
1. Drop the LV "Request" object on the BD
2. Call "Create Session.vi"
3. Call "Check If Session Exists.vi'
This doesn't appear to work. Does anyone else have ideas on how to make something like this work, or mock out the LV web service interactions during unit testing? I could, of course, refactor most of my subvis to not require Request.lvclass on the conpane, but there are still subvis that depend on it that I would like to exercise.
Thanks for your time.
-ksh
05-30-2017 02:53 PM
Is the issue related with the web services or with the rest of yor code? Have you take a look of the LV examples for Web services?
05-30-2017 04:08 PM
@Machop wrote:
Is the issue related with the web services or with the rest of yor code? Have you take a look of the LV examples for Web services?
Based on my example above, I am only using LV primitives, so I would have to say the former. And I don't know that it's an 'issue' so much as I don't know how to accomplish what I want to do (unit test LV requests). I can get the LV web service methods and requests functioning fine in an integrated fashion, which seems to be what the LV examples cover. But what I'm after here is specifically unit testing subvis with the Request.lvclass on the connector pane.
Thanks!