Menu

list of tests are not getting listed

Help
2013-04-26
2013-10-25
  • vilas shinde

    vilas shinde - 2013-04-26

    hi i have developed a simple vb activeX dll project and trying to test the same project.
    I added a simplyVBUnit project to a group, reference of activeX dll project is added to simplyVBUnit project and added. When i runs this application it does not throw any error but methods are not getting listed.

    installed version: SimplyVBUnitSetup-4.1
    OS: windows 7 Enrterprise

    code snippet from class module
    <snippet>
    Dim obj1 As Class1

    Public Sub addition()
    Assert.That obj1.Add(2, 2), Iz.EqualTo(0)
    End Sub

    Public Sub subtraction()
    Assert.That obj1.subtract(2, 2), Iz.EqualTo(0)
    End Sub

    Public Sub pass()
    Assert.AreEqual "HI", "hi"
    End Sub

    </snippet>

    Code snippet from frmTestRunner

    <snippet>

    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ' Form Load
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    Private Sub Form_Load()
    ' Add tests here
    '
    AddTest New testcases

    End Sub

    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ' Form Initialization
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    Private Sub Form_Initialize()
    Call Me.UIRunner1.Init(App)
    End Sub

    </snippet>

    Please help
    Thanks in advance

     
  • Kelly Ethridge

    Kelly Ethridge - 2013-04-26

    Is the SimplyVBUnit project set as the startup project?

     
  • vilas shinde

    vilas shinde - 2013-04-26

    yes

     
  • Kelly Ethridge

    Kelly Ethridge - 2013-04-26

    Is the testcases class in the SimplyVBUnit project?

     
  • vilas shinde

    vilas shinde - 2013-04-26

    Yes, testcases class is in SimplyVBUnit project.

    i also tried same code on windows XP machine, but still it gives the same result "list of test is not getting listed"

     
  • Kelly Ethridge

    Kelly Ethridge - 2013-04-26

    Is it possible to zip up the project group and send it to me?

     
  • vilas shinde

    vilas shinde - 2013-04-26

    yes, please find attachment

     
  • Kelly Ethridge

    Kelly Ethridge - 2013-04-26

    When I run your sample, the add2 method test shows up as it should. The add3 method is private, so it won't show up. The add1 method has parameters so won't show up because the test class is not set up to handle that. The sample you sent works as expected. I can't think of anything else to try.

     
  • vilas shinde

    vilas shinde - 2013-04-26

    well, what can i say then?
    here i am attaching a screenshot when i ran same application on my machine.
    just have a look at it.
    can you send me urs result screenshot?

     
  • Kelly Ethridge

    Kelly Ethridge - 2013-04-26

    Well that is odd. You aren't running a compiled version are you?

     
  • vilas shinde

    vilas shinde - 2013-04-29

    Yes, i am running a compiled version.

     
  • vilas shinde

    vilas shinde - 2013-04-29

    Hi, which operating system your machine is having?
    because when i created an applicaiton on a machine having Windows2003 Operating system. It was running properly and also showing a list of test cases but when i tried to run same application on my Windows 7 32 bit machine, it is not showing list of test cases.

     
  • Kelly Ethridge

    Kelly Ethridge - 2013-04-29

    I run on Windows 7 64 bit. I've never tried it on a 32 bit machine. I don't know what could be so different. I do have all the User Account Control settings set to never notify. Though I don't know if that has anything to do with your issue.

     
  • Peter Hirn

    Peter Hirn - 2013-08-31

    I ran into the same problem on a windows 8 x64 machine. The runner kept on showing (0 Tests). It turned out that I didn't install VB6 correctly. After some googlefoo I came up with these steps to get a working vb6 installation:

    • Mount the vb6 iso (en_vb6_ent_cd1.iso)
    • Run the setup.exe in compatibility mode (XP SP3) as administrator
    • Select custom installation and make sure you deselect the 'Data Access' component
    • After the installation reboot your machine (setup will ask for it)
    • Download and install 'Service Pack 6 for Visual Basic 6.0' from http://www.microsoft.com/en-us/download/details.aspx?id=5721
    • Download and install 'Microsoft Visual Basic 6.0 Service Pack 6 Cumulative Update' from http://www.microsoft.com/en-us/download/details.aspx?id=7030
    • Make sure everything worked out by checking
      • VB IDE -> Help -> About shows 'Microsoft Visual Basic 6.0 (SP6)'
      • C:\Windows\SysWOW64\mscomctl.OCX 'Date modified' is 02.05.2012

    Hope this helps.

     
  • BenDGillard

    BenDGillard - 2013-10-25

    Try regsvr32'ing TLBINF32.DLL which you should find in system32 (x86) or syswow64 (x64). You will need Admin permissions.

    I have a VB6 + SP6 (no security rollup etc) installation on XP 32-bit (Windows XP Mode in Virtual PC) and got the same symptom. Running the sources errored in SimplyVBUnit.Component.vbp, MemberQuery.InitedSuccessfully, on the line

    Set mInfo = TLI.InterfaceInfoFromObject(TestClass).VTableInterface

    with 429, ActiveX Component can't create object.

    I believe you can also register that .dll by starting a new VB6 project (any kind), go to Project|References, click browse, browse for and select TLBINF32.DLL, click ok and ok again, which is how I accidentally found this fix. All appears to be working correctly now. ymmv.

     

Log in to post a comment.