Skip to content
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

No test available in compiled exe #4

Open
wqweto opened this issue Jan 21, 2019 · 5 comments
Open

No test available in compiled exe #4

wqweto opened this issue Jan 21, 2019 · 5 comments

Comments

@wqweto
Copy link

wqweto commented Jan 21, 2019

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?

@kellyethridge
Copy link
Owner

Hello,

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

@wqweto
Copy link
Author

wqweto commented Jan 21, 2019

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.

@bryceschober
Copy link

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.

@wqweto
Copy link
Author

wqweto commented Jun 7, 2019

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.

@Rhorandir
Copy link

Just as a comment for the running the test in a CI environment.
It is possible to create a console Testrunner with the provided libraries in this project.
I need to request our company if we can provide our solution for the OpenSource Community, but the very basic approach is creating a Testcollector in VB6 as part of the COM Library containing the tests and make this interface as static as possible and than build a console application with e.g. .NET and consume this interface and executes the test like the frmtestrunner does, just hand over the collected test classes.
You may need to have your VB6 libraries to be project compatible to previously created and shared library with the test runner. (Some COM magic required to make things work).
To make things work better with newer cintooling, you can export the test results into other formats like nunit or junit by parsing the testresult and coverting it into your format of choice.
Well this approach need to adopted per project, but I guess its even possible to make things more generic, if you know COM better than me ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants