-
Notifications
You must be signed in to change notification settings - Fork 27
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
Set test names/reference in testSuite:New.vi #40
Comments
Having just tested this, the behaviour when using two almost empty classes inheriting from the implemented ServerWriterTestCase.lvclass, with just a boolean returning DD VI, is to give a testSuite with no tests (presumably because the actual testCases have no tests, as found by listAllTestMethods.vi) and then have the testCase appear alone, and operate with the default data value (false). |
Hi @chrisb2244. This is a very good idea -- I can see how having different display names for each instance of a TestCase or TestSuite would be very helpful. I've wanted this, too. I'll review the details of your proposal in more depth, soon. Please do feel free to keep posting your thoughts and ideas about this. I read all the posts :-) |
Added testCaseInstanceName field and public accessors to TestCase class. Added private vi Get Test Instance Name.vi to GraphicalTestRunner.lvlib. Modified Initialize Tests On Tree.vi to use the instance name returned by Get Test Instance Name.vi instead of just using the class name.
In testSuite:New we can collect the same test case with some different inputs (for me, different classes in the same object hierarchy) and then run the same test case for the different inputs without code duplication (apologies for the default icons - it's the same test case with two values of a boolean).
However, in the GUI, there's no good way to see which might be which (that I know of... maybe there is?)
Would it be possible to make a modification to allow changing the line that appears in the GUI.
Then we could have something like
and with/without library/class names (either would be fine, shown here with library but not class which is probably pretty inconsistent and so maybe a bad combination)
(apologies this time for Paint skills)
I suppose a workaround is to have a testCase with a dynamic dispatch "Get Class to Test.vi" and then child classes which just provide the class constant, and implement all the tests in the parent. I haven't tried this to know what the outcome will be in VI Tester but it sounds possible and might give me the appropriate child class names in the GUI... if this is the usual method then my apologies for the unnecessary issue!
The text was updated successfully, but these errors were encountered: