Git Product home page Git Product logo

simplyvbunit's People

Contributors

kellyethridge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simplyvbunit's Issues

no SimplyVBUnit project template after install of 5.0.4

this issue looks the same as https://sourceforge.net/p/simplyvbunit/discussion/415411/thread/807817da/

looks like the install is trying to get the path by reading the registry
RegQueryStringValue(HKCU,'Software\Microsoft\Visual Basic\6.0', 'TemplatesDirectory', TemplateDir);
which doesn't exist on my machine

I think it could use the ProductDir registry key in HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual Basic to get the install folder for vb6, then append "TemplatesDirectory". I couldn't say if people are seeing different registry keys for their VB6 setups, or why the key for "TemplatesDirectory" doesn't exist on my machine.

copying "frmTestRunner.frm" and "SimplyVBUnit Project.vbp" from "C:\Program Files (x86)\SimplyVBUnit 5.0\Source\Projects" to "C:\Program Files (x86)\Microsoft Visual Studio\VB98\Template\Projects" got the templates added.

Project template not in New Project selector

I've installed VB6 on Windows 10, downloaded and installed (as Administrator) SimplyVBUnit, and started a New Project. Unfortunately, the Simply VBUnit Project is not available to be selected.

image

Version 5.0.1 Released

I'd like to announce the release of SimplyVBUnit version 5.0.1.

This version includes a couple bug fixes and UI enhancement.

  • Fixes
    Asserting against a compiled object that is private is incorrectly handled.
    Enhanced enumerable object detection for objects of private classes.

  • Features
    Added "Errors" panel to status bar in UI.

Release current source as version 5.0.5

Thank you for the great work building SimpleVBUnit! It seems that template references are now correct inside the source code, while are broken in the latest release version 5.0.4.
It would be great if it were possible to create a new release version 5.0.5 with the updates so that newcomers can immediately get started with the examples and enjoy all the great functionality that SimpleVBUnit provides. It would be then possible to close the related issue (#13). Thank you in advance for the consideration!

Assertion is not catched, runtime error is shown

When assertion failed on running tests, runner will stop with runtime error dialog.
I expect that this error is catched and counted as 'failed test', and continue next test.
I guess it might be because I'm using Japanese version of VB6 (SP6).

For example, with this test code...

Sub Test1()
    Assert.Fail "test for assertion"
End Sub

... cause runtime error dialog.
(NOTE: "実行時エラー" means "runtime error")
runtime-error-by-Assert Fail

Add older releases to the repository

First of all, let me thank you for bringing this project to GitHub and continuing to develop it (and for making it in the first place, of course!).
I became interested in it a few months ago, when it was still on SourceForge, and had become convinced that it was stone-dead. I was flabbergasted when I saw "5.0" today!!


Now, here's the actual, first, request. It's not very fun, I'm afraid:

Would it be possible to add to the repository the releases before 2009-11?

I suppose that's the date you started to use a VCS (svn), and that's the reason the repository starts there.

However, I imagine you still have copies of the code of at least the major releases before that, right? Apparently at least the 3.0 and the 2.1 versions used to be downloadable from SourceForge; they are not anymore but I imagine you kept copies of at least them.

Why would I want them?

To help studying the code:

Currently there are 136 files just in the Framework part, with very little documentation, so it's very hard to understand even where to start to read the code.

In what's currently the first commit of the repository there were a lot less files (47 in the Framework), but still enough to make getting familiar with the code quite an endeavour.

However I imagine things were a lot simpler in the first releases.

They were for sure very different from the current code (looking at https://sourceforge.net/p/simplyvbunit/news it appears you rewrote everything more than once), but they would most likely help to understand how things started and how they got to the current point, and so to gradually understand the current code.

What's more, the core of the source is probably still where it was in the first versions, so studying them can tell you at the very least where to start from with the current code.

By the way, yes, the lack of documentation is a problem in itself (maybe I'll make a separate Issue about that), but even if the code were extensively documented looking at how it was in the first releases would be helpful in some cases. At the very least, it would be interesting!

How?

You are probably thinking, "this guy doesn't know that you can't change a git repository's history".

It's not like that, I do. However:

  1. Git has a feature to indeed change a repository's history, although not really: it's git replace.
    It lets you "cover" individual commits with different ones, so that the commands and tools that support the feature behave as if you replaced the commits, but without changing the hashes of the following commits.
    It's a trick, but it works rather well in my experience.
    This allows to put new commits before the beginning of the current repository, by replacing the first commit of the repository with one identical except for the addition of a reference to another commit (this commit would be the most recent one of the chain of commits you want to add).
    It's not very fun, but not as hard as it might appear either. I could guide you in the process if you decide to take this step.

  2. The move to git and github was very recent, and you appear to have made only 9 commits since then. This means that we are still at a time where rewriting the repository would not be unthinkable: there are probably very few people who already cloned it, there are no references to previous hashes in the current commit messages and it would probably not cause significant disruption to the developers (you) to have indeed the history rewritten.
    Given the favourable state of things, I think this option should be given serious consideration: git replace does seem to work well but it's a trick, and using it is likely to bring some problems, for some uses, now or in the future. So as long as it's conceivable to make a complete rewrite instead of using it, it's strongly advisable to consider doing so.
    If you do take this path, remember to put a very prominent note in the README.md warning of the rewrite, with instructions for what to do if you had already cloned the repository.

What?

Even just one old release would help a lot, but if you happen to have more snapshots, possibly even between the public versions ("manual", copy-and-pase, version control, or possibly even commits of a VCS you used only privately, if you did) , it would help a lot to include them as well. The more the better, to understand the evolution of a software project.

Why now?

Well, I ask you now most of all because I just now got to know that the project is still alive, but aside from that we're now very close to the ideal time for doing stuff like this, as I explained above.
So it's worthwhile to give this thing a serious consideration now, before enough people clone or reference the repository that rewriting it becomes inconceivable.

Alternatives

A simple alternative of course would be to simply re-publish the code of the old versions somewhere.

Entirely acceptable, but if we can, including them in the repository itself would add a considerable amount of convenience for the "students"/code archeologist.

Minutiae

If you do end up rewriting the history, it might be helpful (for someone) to add a tag, in the rewritten repository, to what was the first commit in the current history, to help them understand what happened and cope with it.
It might be called "previous_first_commit", with a lengthier explanation in its comment (annotation).

Versions tags

As per Issue #3, if you do this it would be better to add tags for these old versions as well.

Assert.AreNotEqual not reporting actual value when test failed

When the test "Assert.AreNotEqual 1, 1" is attempted the error message contains the text
Expected: not 1
But was : Empty

This behaviour is also seen if tests Assert.AreNotEqualFloats or Assert.AreNotEqualStrings are used.

I've traced this back to EqualConstraint.Matches.
mActual is only populated when mComparer.Equals(mExpected, Actual) = False.

The fix is to always call "VariantCopyInd mActual, Actual" at the start of EqualConstraint.Matches.

Has anyone noticed this and if so do you have a different solution?

Weird permissions issue

@kellyethridge , all
I'm trying to create a simple dll project with SimplyVBUnit and running into a weird problem. When I open the project group and build the project, everything goes according to plan THE FIRST TIME, but every subsequent build attempt after results in a Permission Denied error in reference to my dll. If I close the project group and reopen it, I can build it ONCE but never again until I restart VB6. Additionally, if I only open the dll project (not the group that contains the test project also) I don't have any trouble building repeatedly. If I re-add the test project to the environment, same problem happens. It seems as if SimplyVBUnit is locking the dll file after the first build. I've verified that the test project is referencing the dll vbp and not the dll directly. Any advice?

Scott

No test cases found in both AssertionExamples, MovieTracker or new SimpleVBUnit Projects

You can find the screenshots attached.
The included examples seem to fail executing the test cases, and report that no tests are inside each of the classes inside the AssertionExamples, MovieTracker or any new SimpleVBUnit Project that is build from scratch. All this while running them from the VB6 IDE with Administrative Rights and Windows XP Service Pack 2 Compatibility Mode on Windows 10.

I also tried to implement ITestFixture like it was recommended on the Sourceforge Forum for compiled executables without success.
With ITestFixture you can see the test case listed, but it does not run and I get back Error 429, ActiveX cannot create the object.

Option Explicit
Implements ITestFixture

Private Sub ITestFixture_GetTestCases(ByVal Test As SimplyVBComp.TestFixtureBuilder)
Test.Add("myTest").Use "arg"
End Sub

Public Sub myTest()
    Debug.Print "This is a failing test."
    Assert.That 1, Iz.EqualTo(2), "Always fails!"
End Sub

Is there anything I can do to solve the problem? Is there any test I may help with in order to pinpoint the problem and fix the issue in new releases?
Thank you for your precious support!

Screenshot of the AssertionExamples project included in the 5.0.4 release not finding any tests:

Assertion Examples not working

Screenshot of the MovieBusinessGroup project included in the 5.0.4 release not finding any tests:

MovieBusinessTests non working

Add tags for the previous versions

It would be convenient if you added git tags for the old releases (before v4.1.6) as well.

It's true that there are few enough of them that it's easy to look for their commits manually, but tags would add convenience.

And if you end up adding other old releases, as per Issue #2, well tags would become even more handy.

Version 5.0.4 Released

I'm pleased to announce the release of version 5.0.4.

Added a minor enhancement with this release.

  • User-defined types can be tests for equality. However, the same restrictions for passing UDT's around still apply.

Azure release gives test run results as No test is available in D:\a\r1\a

Under my project solution i have multiple web tests in Visual Studio 2017. While checking in git repo now i am trying to add this solution which has all web test scripts in azure pipeline release. Once release is created everything runs well including project solution but end of the release it says "No test is available in D:\a\r1\a_Performance\drop\packages". So it never runs those web tests in the assigned vsts2017 VMserver.

[command]D:_work_tool\VsTest\16.0.0\x64\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe @d:_work_temp\5c6a81b1-3ba4-11e9-9f62-33b695c91a61.txt
2019-02-28T22:01:12.8971948Z Microsoft (R) Test Execution Command Line Tool Version 16.0.0
2019-02-28T22:01:12.8974196Z Copyright (c) Microsoft Corporation. All rights reserved.
2019-02-28T22:01:12.8974262Z
2019-02-28T22:01:13.6547537Z vstest.console.exe
2019-02-28T22:01:13.6548147Z "D:_work\r1\a_Performance\drop\WebAndLoadTestProject1\bin\Release\Microsoft.VisualStudio.QualityTools.WebTestFramework.dll"
2019-02-28T22:01:13.6548405Z "D:_work\r1\a_Performance\drop\WebAndLoadTestProject1\bin\Release\WebAndLoadTestProject1.dll"
2019-02-28T22:01:13.6549990Z /Settings:"D:_work_temp\5c7b2380-3ba4-11e9-9f62-33b695c91a61.testsettings"
2019-02-28T22:01:13.6550436Z /logger:"trx"
2019-02-28T22:01:20.2083460Z Starting test execution, please wait...
2019-02-28T22:01:21.4449882Z The following DLL(s) do not match the specified framework .NETFramework,Version=v4.5 and platform X86 settings.
2019-02-28T22:01:21.4450541Z Microsoft.VisualStudio.QualityTools.WebTestFramework.dll is built for Framework 4.0 and Platform AnyCPU.
2019-02-28T22:01:21.4451521Z Ensure that the test assemblies target the specified framework/platform settings. Go to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more details on managing these settings.
2019-02-28T22:01:31.8712695Z TestSettings will soon be deprecated for automated unit and functional testing scenarios. It is recommended that you use RunSettings. To learn more, see http://aka.ms/runsettings
2019-02-28T22:01:35.3315409Z TestSettings will soon be deprecated for automated unit and functional testing scenarios. It is recommended that you use RunSettings. To learn more, see http://aka.ms/runsettings
2019-02-28T22:01:36.6120443Z No test is available in D:_work\r1\a_Performance\drop\WebAndLoadTestProject1\bin\Release\Microsoft.VisualStudio.QualityTools.WebTestFramework.dll D:_work\r1\a_Performance\drop\WebAndLoadTestProject1\bin\Release\WebAndLoadTestProject1.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
2019-02-28T22:01:37.1681780Z Results File: D:_work\r1\a\TestResults\VssAdministrator_fv-az550_2019-02-28_22_01_36_943.trx

Project template (.vbp and .frm) should have good references

I'm using ver. 5.0.4, no previous version used.
On creating new SimpleVBUnit project via wizard, test runner form are not created correctly
and I got error dialog about .tlb reference.
It is because template .vbp and .frm has bad references of component and type library.
Project template (.vbp and .frm) should have good references like this, I guess:
(I'm happy with these templates copied into C:\Program Files (x86)\Microsoft Visual Studio\VB98\Template\Projects\)

diff --git a/Source/Projects/SimplyVBUnit Project.vbp b/Source/Projects/SimplyVBUnit Project.vbp                          
index 0275626..40ba2a0 100644                                                                                             
--- a/Source/Projects/SimplyVBUnit Project.vbp                                                                            
+++ b/Source/Projects/SimplyVBUnit Project.vbp                                                                            
@@ -1,7 +1,7 @@                                                                                                           
 Type=Exe                                                                                                                 
 Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\..\Windows\SysWOW64\stdole2.tlb#OLE Automatio
n                                                                                                                         
-Reference=*\G{923925AC-1013-4D27-9FB1-4FF0B3B47BA2}#4.0#0#..\..\..\..\..\..\..\Windows\SysWow64\SimplyVBUnitType.tlb#Simp
lyVBUnit Type Library 4.0                                                                                                 
-Object={7983BD3B-752A-43EA-9BFF-444BBA1FC293}#4.0#0; SimplyVBUnit.Component.ocx                                          
+Reference=*\G{3E4F7CEC-C640-49F1-80D9-8DD42421CB1B}#5.0#0#..\..\..\..\..\..\..\Windows\SysWOW64\SimplyVBUnitType.tlb#Simp
lyVBUnit 5.0 Type Library                                                                                                 
+Object={7983BD3B-752A-43EA-9BFF-444BBA1FC293}#5.0#0; SimplyVBUnit.Component.ocx                                          
 Form=frmTestRunner.frm                                                                                                   
 Startup="frmTestRunner"                                                                                                  
 Command32=""                                                                                                             
diff --git a/Source/Projects/frmTestRunner.frm b/Source/Projects/frmTestRunner.frm                                        
index 303644d..2fda3b7 100644                                                                                             
--- a/Source/Projects/frmTestRunner.frm                                                                                   
+++ b/Source/Projects/frmTestRunner.frm                                                                                   
@@ -1,5 +1,5 @@                                                                                                           
 VERSION 5.00                                                                                                             
-Object = "{7983BD3B-752A-43EA-9BFF-444BBA1FC293}#3.2#0"; "SimplyVBUnit.Component.ocx"                                    
+Object = "{7983BD3B-752A-43EA-9BFF-444BBA1FC293}#5.0#0"; "SimplyVBUnit.Component.ocx"                                    
 Begin VB.Form frmTestRunner                                                                                              
    ClientHeight    =   5535                                                                                              
    ClientLeft      =   120                                                                                               

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.