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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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)
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
Is the SimplyVBUnit project set as the startup project?
yes
Is the testcases class in the SimplyVBUnit project?
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"
Is it possible to zip up the project group and send it to me?
yes, please find attachment
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.
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?
Well that is odd. You aren't running a compiled version are you?
Yes, i am running a compiled version.
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.
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.
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:
Hope this helps.
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.