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

VBCorTests project failures #10

Open
bryceschober opened this issue May 30, 2019 · 9 comments
Open

VBCorTests project failures #10

bryceschober opened this issue May 30, 2019 · 9 comments

Comments

@bryceschober
Copy link
Contributor

I'm submitting a bug report

Library Version: git master@e12acb5

Please tell us about your environment:

Current behavior:

  1. When I build the project group, or also just the VBCorTests project, after successfully building
    the Source\CorLib\VBCor3.dll and the Source\Fakes\Fakes.dll, I get a compilation error in
    trying to build the VBCoreTests project:

    Compile error:
    Variable uses an Automation type not supported in Visual Basic
    And it highlights the phrase GuidToUse As Guid on line 120 of GuidTests.cls.

  2. When I try the "Run with full compile" command on the VBCorTests project, I get a different error:

    Object library not registered

  3. When I try to just "Run" the VBCorTests project, I get yet a different error:

    Compile error:
    Method or data member not found

Expected/desired behavior:

I want to be able to run the test suite to validate that I have a good compilation of the current git master dll.

Am I missing a dependency somewhere? Do I need to register the .dlls that I've built?

@bryceschober
Copy link
Contributor Author

FWIW, I just noticed that l the IDE did update my .vbp files so that they no longer had relative path references, and they were replaced with relative paths to the dll files.

@bryceschober
Copy link
Contributor Author

Bah, I just realized that I hadn't registered the TypeLib\CorType.tlb and VBVM6Lib.tlb. After doing that from an elevated shell, I get:

image

And it drops me into GuidTests.cls at line 86, in the "Equals_WithNonGuidValues_ReturnsFalse" test case.

@bryceschober bryceschober changed the title VBCorTests project fails to Run or Compile VBCorTests project failures May 30, 2019
@bryceschober
Copy link
Contributor Author

@kellyethridge Any ideas on why I might not be able to run your unit test suite? I'm still blocked on the most recently reported problem.

@kellyethridge
Copy link
Owner

HI,

Sorry about the delay. I don't get much time for this.

Anyways, to the Guid issue at the top of this thread. It's most likely because the VBCorLib Guid is in a naming conflict and the reference to VBCorLib needs to be moved up in priority in references.

I'm not sure was the Error 91 is coming from, I'll have to look more in to that. I did however find an issue with SimplyVBUnit that will cause tests to fail with a compiled VBCorLib that will be addressed.

@bryceschober
Copy link
Contributor Author

For whatever reason, after installing the latest SimplyVbUnit v5.0.1, I can now run the test runner successfully... And I get 11 of failing tests. I assume this isn't expected, and I'd love to report them, but I'm not sure how I'd get the results out of the test runner app...

FWIW, most of the failures are directory-related and seem to be triggered by my project living under my e:\.

@kellyethridge
Copy link
Owner

I'm glad the tests are actually running now. As for capturing the output of the tests I've been using a logger class. I've included it as an attachment. You will need to change the extension back to cls. I added it in the From_Initialize event of the test runner.

Private Sub Form_Initialize()
    Me.UIRunner1.Init App
    Me.UIRunner1.AddListener New OutputLogger
End Sub

This will generate a log file of errors and failing tests.
OutputLogger.txt

@BluejacketScott
Copy link

BluejacketScott commented Jun 1, 2020

I, too, am having failed tests but I think I understand the nature of the problem - I think the root of all of them is this:

CorLib.Tests.System.TimeZoneTests.Constructor_WhenCalled_ReturnsExpected: Time zone 'US Mountain Standard Time' is not supported by tests.

I'm in Phoenix and am definitely using US Mountain Standard Time as my timezone (we're in the small minority that ignores DST changes) We're GMT-7 year round.

@BluejacketScott
Copy link

@kellyethridge I sent you a pull request for US MST issues. Only one left:

EnvironmentTests.GetCommandLineArgs_WhenCalled_ReturnsArgs failed: Expected: 2 but Was: 1

It might have more to do with the way I'm running the tests. I'm loading up the CorLib.Solution.vbg in the Source directory. Is that the problem? Is there a better way to load up so as to avoid this issue?

@BluejacketScott
Copy link

Found the reason for my above error. Opening VB6 first, and then browsing and opening CorLib.Solution.vbg means that the command line arguments only contain one element: the VB6.exe. However, if one were to close VB6 and double-click CorLibSolution.vbg instead, the test passes. PR submitted.

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

3 participants