question

mbarfiel avatar image
mbarfiel asked mbarfiel posted

Presenting topology information in a report?

We have been using topologies and this feature looks very promising. It needs some improvements to make it more user friendly but overall it works pretty well.

 

I want to present topology information for internal test reviews but the important information like card/port info is a child object to the to the device and hidden. I would like to pull that info out as as summary information. The report would have a picture of the topology devices (high-level) and underneath I would have a text output that summarizes the devices. Any ideas on how to accomplish this?

 

For example (pull out specific properties):

Device 1 (description)

Card 1 (Part #, card type)

Port 1 (Connected Y/N, endPoint)

...

Port 32 (Connected Y/N, endPoint)

 

Device x (description)

Card x (Part #, card type)

Port 1 (Connected Y/N, endPoint)

...

Port x (Connected Y/N, endPoint)

 

Thanks.

iTesttopology
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

GregM avatar image
GregM answered GregM posted

The TBML is part of the test report data, so in principle this data could be presented with a custom test report. Unfoturnately, I've not had much luck with this--I'm not very good at xslt and I'm not sure I understand the test report schema.  I added the following to summary.xslt in the Topology section:

 

		<xsl:for-each select="//*">
			<tr>
				<td>
					<xsl:value-of select="@id"/>
				</td>
			</tr>
		</xsl:for-each>

 

This adds the names of all the topology components to the test report.  I'm not sure why //* is working but //resources/resource is not.

10 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mbarfiel avatar image mbarfiel commented ·

I created a procedure to parse out device, card, port information. Right or wrong, I read the tbml file and store the response. I use xpath and some conditional statements to pull out device information.

 

I assume that devices will have this structure:

Device/Card/Port

or

Device/Port

 

I make assumptions that the topology will be stored in this format. If the user puts object more than 3 deep this won't work. I pull the data out in a tab delimited format that we can load into a spreadsheet. Also, I'm thinking about putting this into a MySQL DB for better reporting options.

 

This seems clunky and I'm not sure how robust this is going to be.

 

Let me know what you think.

 

 

 

 

0 Likes 0 ·
YujieL avatar image YujieL mbarfiel commented ·

You general approach for looping through the file is fine.

A alternative approach is that you set the topology as the testbed in your test case, then use the tbml command in your test case to get the information you need.  By doing it this way, you don't have to know xpath or the underlying xml structure of the topology file, because the tbml command is doing it for you.  You're also not restricted to three levels deep.  However, you will need to be familiar the tbml command.  So if you are already an xpath expert, chances are you can just use your current approach because the tbml xsd is not likely to change.

 

Here is how you would do it with tbml command:

 

[tbml deviceList] returns IDs of all top level devices.

 

From there you can use [tbml deviceList -id]  to return children Ids, which would be the ids for your cards and ports.

 

Once you have the id for a port or card, you can use [tbml property -id <property path>] to get property values.  In most cases, the property path is just the name of your property, unless you have nested properties.

 

To not limit yourself to three levels deep, you can use recursion.  Basically you would create a procedure, and one of the steps in the procedure is the command [tbml deviceList -id]. Once you get the list of ids, and the list is not empy, the next step might be to call the procedure from within the procedure.

 

Unfortunately, I don't have the time to create an example test case.  You can give it a try if this makes sense to you.  Search for "tbml command" in Help.

 

0 Likes 0 ·
mbarfiel avatar image mbarfiel YujieL commented ·

I'm going to experiment with this solution. The TBML commands are a little cryptic to me. I will see if I can make this work. I'm that comfortable wit table queries at this point.

 

However, I hope Fanfare can see that reporting topology information can take this feature to the next level.

 

Thanks.

0 Likes 0 ·
mbarfiel avatar image mbarfiel YujieL commented ·

How do I get the device/card/port type property (@Type) using the tbml query? This is useful information for creating a topology report. I didn't see anything in the tbml commands that would allow this.

 

Thanks.

0 Likes 0 ·
YujieL avatar image YujieL mbarfiel commented ·

for attributes, you'll need to use xpath.  [tbml query <xpath>] will do. 

0 Likes 0 ·
sreekanth avatar image sreekanth mbarfiel commented ·

Please have a look into the attached test case.

 

Hope this helps.

0 Likes 0 ·
TBML.fftc (43.4 KiB)
mbarfiel avatar image mbarfiel sreekanth commented ·

The script looks like it has a lot of good examples. I will look over the examples and study the behavior.

 

Could you attach the topology you used for your examples? That will allow me to see the commands in action.

 

I'm OK with the TBML commands. It's still tough to traverse the topology and pull out all the the information I'm looking for. I'll have to use a combination of TBML commands and custom queries to get the job done.  I'll see if I can make some headway based on the information provided.

 

Thanks.

0 Likes 0 ·
sreekanth avatar image sreekanth mbarfiel commented ·

Mike,

 

Here I am attaching the toplogy,test case and session profile for your reference, please find attachment.

 

Hope this helps.

 

 

0 Likes 0 ·
topology.tbml (19.9 KiB)
topology.fftc (48.7 KiB)
cmd.ffsp (262 B)
msandeep avatar image msandeep sreekanth commented ·

Hi,

 

We can retrieve type of all the devices,cards and ports using "[tbml query <xpath>]" command. I have tried this in house with some possibilities.

 

Please find the attached files for your reference.

 

Hope this helps you!!

 

Thanks,

Sandeep

0 Likes 0 ·
tbml1.fftc (4.1 KiB)
new_topology.tbml (3.3 KiB)
tbml1.html (14.5 KiB)
mbarfiel avatar image mbarfiel msandeep commented ·

I'm getting closer to getting this resolved. I'm able to loop through the topology and pull out the names in tree format. I appreciate the input and I'm actively working on this.

 

Thanks.

0 Likes 0 ·
mbarfiel avatar image
mbarfiel answered mbarfiel posted

Your example will work on a simple diagram but our topologies are more complex. We have several chassis that have multiple cards/ports plus supporting equipment. I was experimenting last night reading in the .tbml file and using xpath to pull out the card/port information for each device. It's a little tedious but I may be able to use that approach.

 

I'll speak with my Fanfare representative about our desire to share tbml diagrams and reports with the customer.

 

Long term, I would like to present a tbml report that dumps device/card/port/end point information in a readable format. This is very useful when a customer or design engineer needs a detailed view of a test bed. The current diagram is too high-level.

 

My ultimate goal is to get away from Visio, which has the detail we are looking for, and solely use topology maps. Visio represents the bed well but has no other function than provide a drawing. Topologies can represent the test bed in a diagram and is functionally usable to the tester.

2 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

udaya avatar image udaya commented ·

This is a good feature to have.

 

In the mean time we can execute tbml codes in the tset case and generate report (if we need)to see the specific properties.

 

I think this will help also.

0 Likes 0 ·
YujieL avatar image YujieL udaya commented ·

perhaps you can use the tbml command to loop through your topology and find the information you need.

0 Likes 0 ·
saranyak avatar image
saranyak answered saranyak posted

Hi mbarfiel,

 

I went through for some options that would help you better.

 I wonder if you could use the "create tbml note" or "create tbml element" options it the  palatte of the topology file.

I'm afraid if this would help you if there are more devices in the topology.

 



1.JPG (38.5 KiB)
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.