SimplyVBUnit icon indicating copy to clipboard operation
SimplyVBUnit copied to clipboard

No test available in compiled exe

Open wqweto opened this issue 6 years ago • 5 comments

I'm working on tests for this project: https://github.com/wqweto/VbYoga/tree/master/test

Testing works very well in VBIDE but once compiled the classes are recognized with no methods and show (0 Tests)

image

Is there something simple I am missing?

Could it be SimplyVBUnit runtime versions mismatch as 5.0 setup went to C:\Program Files (x86)\SimplyVBUnit 4.1 for some reason?

wqweto avatar Jan 21 '19 15:01 wqweto

Hello,

Unfortunately this is the effects of a compiled EXE. Here is a discussion on the issue you're having

kellyethridge avatar Jan 21 '19 19:01 kellyethridge

Thank you for the info. Too bad fetching available tests is not possible to be automated in the compiled binary.

I just integrated an (optional) codegen of ITestFixture_GetTestCases directly in the Form_Load of frmTestRunner of my test project to reduce manual copy/paste.

FYI, couple of my tests failed when compiled, e.g. .IsNotNothing node failed on an objects reference for no apparent reason while .AreNotSame Nothing, node now works as expected.

wqweto avatar Jan 21 '19 20:01 wqweto

I'm also interested in running from a compiled .exe... Were your changes a possible solution to this, @wqweto? Ultimately, what I'd love to do is run all the tests in a command-line mode with reasonable output for an automated build system, @kellyethridge.

bryceschober avatar Jun 07 '19 17:06 bryceschober

I did not attempt generic solution but had to implement ITestFixture_GetTestCases which is the supported way by the framework.

The most inconvenient part is that although the codegen is automated it has to be triggered manually and the generated code has to be copy/pasted manually too when new tests are added.

wqweto avatar Jun 07 '19 19:06 wqweto