comunit-development Mailing List for COMUnit
Brought to you by:
exortech,
kimgrasman
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: R. O. R. <ow...@ex...> - 2002-08-03 00:35:07
|
Hi James, Thanks a lot for your submission. Sorry that I haven't got back to you until now. It turns out that, despite being the project owner, I wasn't subscribed to the developers mailing list. Anyway, with release 1.2, the COMUnit Trace control has now been integrated into the COMUnit Runner. I will integrate your modifications into the release. Thanks again for your help, Owen. Hi, I just started using COMUnit today, and it looks really handy! I wanted to be able to see the Trace output of the tests as they progressed, so I did a quick patch to the UnitTrace control. It will scroll the window to ensure visibility of each new node (as long as it's parent is not collapsed). Anyway, the patch is below. If it's easier, I can post the whole file (but I figured if you're using CVS...) James Chaldecott -- www.exortech.com |
|
From: <Jam...@ox...> - 2002-04-09 17:21:41
|
Hi,
I just started using COMUnit today, and it looks really handy!
I wanted to be able to see the Trace output of the tests as they progressed,
so I did a quick patch to the UnitTrace control. It will scroll the window
to ensure visibility of each new node (as long as it's parent is not
collapsed).
Anyway, the patch is below. If it's easier, I can post the whole file (but I
figured if you're using CVS...)
James Chaldecott
--- /mnt/d/Temp/COMUnit/source/COMUnitTrace/UnitTrace.ctl Fri Aug 3
00:11:24 2001
+++ /mnt/c/Program Files/COMUnit/source/COMUnitTrace/UnitTrace.ctl Tue
Apr 9 17:30:12 2002
@@ -1,4 +1,4 @@
VERSION 5.00
-Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
+Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.UserControl UnitTrace
ClientHeight = 3840
@@ -82,5 +82,8 @@
Dim oNode As Node
Set oNode = tvTrace.Nodes.Add(, tvwChild, TestName(oTestCase),
TestName(oTestCase), g_lOKImage)
- tvTrace.Nodes.Add oNode.Index, tvwChild, , "Start Test Case",
g_lOKImage
+ ShowNode oNode
+
+ ShowNode tvTrace.Nodes.Add(oNode.Index, tvwChild, , "Start Test Case",
g_lOKImage)
+
Set m_oTestCase = oTestCase
DoEvents
@@ -90,5 +93,5 @@
Dim oNode As Node
Set oNode = tvTrace.Nodes(TestName(m_oTestCase))
- tvTrace.Nodes.Add oNode.Index, tvwChild, , "End Test Case", g_lOKImage
+ ShowNode tvTrace.Nodes.Add(oNode.Index, tvwChild, , "End Test Case",
g_lOKImage)
' change top node icon depending on trace events
@@ -102,4 +105,5 @@
Wend
oNode.Image = lImage
+
DoEvents
End Sub
@@ -108,5 +112,5 @@
Dim oNode As Node
Set oNode = tvTrace.Nodes(TestName(oError.TestCase))
- tvTrace.Nodes.Add oNode.Index, tvwChild, , "Error: " &
GetErrorMsg(oError), g_lErrorImage
+ ShowNode tvTrace.Nodes.Add(oNode.Index, tvwChild, , "Error: " &
GetErrorMsg(oError), g_lErrorImage)
DoEvents
End Sub
@@ -115,5 +119,5 @@
Dim oNode As Node
Set oNode = tvTrace.Nodes(TestName(oError.TestCase))
- tvTrace.Nodes.Add oNode.Index, tvwChild, , "Failure: " &
oError.Description, g_lFailureImage
+ ShowNode tvTrace.Nodes.Add(oNode.Index, tvwChild, , "Failure: " &
oError.Description, g_lFailureImage)
DoEvents
End Sub
@@ -122,7 +126,19 @@
Dim oNode As Node
Set oNode = tvTrace.Nodes(TestName(m_oTestCase))
- tvTrace.Nodes.Add oNode.Index, tvwChild, , "Trace: " & sMessage,
g_lOKImage
+ ShowNode tvTrace.Nodes.Add(oNode.Index, tvwChild, , "Trace: " &
sMessage, g_lOKImage)
+
DoEvents
End Sub
+
+Private Sub ShowNode(ByVal oNode As Node)
+ If (oNode.Parent Is Nothing) Then
+ oNode.EnsureVisible
+ Else
+ If (oNode.Parent.Expanded) Then
+ oNode.EnsureVisible
+ End If
+ End If
+End Sub
+
Private Function GetErrorMsg(oError As TestError)
GetErrorMsg = oError.Source & " (" & Trim(oError.ErrNumber) & "): " &
oError.Description
### OXFORD INSTRUMENTS http://www.oxford-instruments.com/ ###
Unless stated above to be non-confidential, this E-mail and any
attachments are private and confidential and are for the addressee
only and may not be used, copied or disclosed save to the addressee.
If you have received this E-mail in error please notify us upon receipt
and delete it from your records. Internet communications are not secure
and Oxford Instruments is not responsible for their abuse by third
parties nor for any alteration or corruption in transmission.
|