Highlighted
Veraison Absent Member.
Absent Member.
57624 views

Exporting Test Cases with all steps to Excel

Jump to solution
When I display the test in the Test Lab grid and right click, Export->All the result that gets dumped to an Excel file does not include the Expected Result or the Description fields. Is there a better way? I'm not able to use the filter because of the custom fields in the test case step table.
0 Likes
1 Solution

Accepted Solutions
rbok78 Absent Member.
Absent Member.

Re: Exporting Test Cases with all steps to Excel

Jump to solution
Hi Varaison,

I developed one simple tool two years ago. The tool allows you to export test cases with all test steps to Excel. The tool supports Quality Center 9.x.

Originaly, we created test cases in excel files. Then we imported these test cases to Quality Center. When we wanted to update them, we usually did it in QC. However, sometimes we were forced to update a lot of details. It was much faster to to that in Excel. As far as I know, QC doesn't support exporting test cases with associated test steps to Excel. Thus I decided to develop this tool.

The format of exported test cases should be the same as if you want to import them to QC. Once we exported test cases by using this tool, we updated them and we used an existing QC add-in to import them back to QC.

I developed the tool using Visual Basic for Applications. I used an existing VB editor which is a part of Microsoft Office. If you want you can update the tool to fulfil your requests. The password is 'arvik'.

I hope it will help you to solve your trouble.

Regards,

Radek
0 Likes
59 Replies
Rhonda Robinson Absent Member.
Absent Member.

Re: Exporting Test Cases with all steps to Excel

Jump to solution
When using the right click > export on any of the grid view, only the columns contained within your grid are exported. Unfortunately, you cannot display the design steps column in the Test Lab.

I would suggest going to the Test Plan and using the Analysys > Tests with Design Steps report.
0 Likes
rbok78 Absent Member.
Absent Member.

Re: Exporting Test Cases with all steps to Excel

Jump to solution
Hi Varaison,

I developed one simple tool two years ago. The tool allows you to export test cases with all test steps to Excel. The tool supports Quality Center 9.x.

Originaly, we created test cases in excel files. Then we imported these test cases to Quality Center. When we wanted to update them, we usually did it in QC. However, sometimes we were forced to update a lot of details. It was much faster to to that in Excel. As far as I know, QC doesn't support exporting test cases with associated test steps to Excel. Thus I decided to develop this tool.

The format of exported test cases should be the same as if you want to import them to QC. Once we exported test cases by using this tool, we updated them and we used an existing QC add-in to import them back to QC.

I developed the tool using Visual Basic for Applications. I used an existing VB editor which is a part of Microsoft Office. If you want you can update the tool to fulfil your requests. The password is 'arvik'.

I hope it will help you to solve your trouble.

Regards,

Radek
0 Likes
Veraison Absent Member.
Absent Member.

Re: Exporting Test Cases with all steps to Excel

Jump to solution
Radek,

That sounds like exactly what I'm looking for. Unfortunately my corp firwall will not allow me download it. Is it possible to simply paste the code into a reply? I'm currently working on building a report that will export everything. I'm very close after ~3 hrs. Should have it by EOD today but I think your programatic solution would be best. Regards.
0 Likes
sibbal Absent Member.
Absent Member.

Re: Exporting Test Cases with all steps to Excel

Jump to solution
Thanks! This is indeed a great! tool. I shall use this t enhance this to next level.

Thanks! once again


Regards,
Raju
0 Likes
Greg Perrego Absent Member.
Absent Member.

Re: Exporting Test Cases with all steps to Excel

Jump to solution
When i click on the download I get a bad link. Am I being blocked or has HP removed this?
0 Likes
Rhonda Robinson Absent Member.
Absent Member.

Re: Exporting Test Cases with all steps to Excel

Jump to solution
Not being able to open the attachments happens a lot if you are using IE. Try using Firefox browser.
0 Likes
Greg Perrego Absent Member.
Absent Member.

Re: Exporting Test Cases with all steps to Excel

Jump to solution
We only use ie on site, can't use firefox... i can try chrome.
0 Likes
Veraison Absent Member.
Absent Member.

Re: Exporting Test Cases with all steps to Excel

Jump to solution
I have reworked this code so that it can be launched from an Excel menu item (custom menu). It prompts the user for parameters and then downloads the desired test case. If someone will tell me how to post it as an attachment I will. I am not the original author but I've made some major enhancements.
0 Likes
Greg Perrego Absent Member.
Absent Member.

Re: Exporting Test Cases with all steps to Excel

Jump to solution
thanks, that post allowed the download. I was in the process of adding code that promted the user for most of the inputs... great minds think alike!

Give me a little while to play with this and I'll shoot an update.

Thanks again,
Greg
0 Likes
Veraison Absent Member.
Absent Member.

Re: Exporting Test Cases with all steps to Excel

Jump to solution
The menu option appears on the "Tools" menu and is called "Import from Quality Center." It is designed to nest with the QC add-in for Export to Quality Center and loads when the sheet is opened. It unloads when the sheet is closed. You'll also need to turn on (un rem) the code to prompt for UID, PW, Domain and Project. Also, reset the QC path variable or prompt for it if you have multiple environments. Finally, the function that grabs the test case copies the data (including some custom fields) into a special test case template that our firm uses for test case construction called "IntelliBuild." You'll need to simply rem that code out and save the original sheet rather than let it do the copy/paste to the TC template. - V
0 Likes
Venugopal R Pat Absent Member.
Absent Member.

Re: Exporting Test Cases with all steps to Excel

Jump to solution
Hi

This tool indeed is very very useful. I just wanted to get some ideas on this. I believe its cannot be done. Still wanted to get your version on this.

The data displayed in excel after importing from QC is included within the HTML tags for formatting done in QC. Is there any possibility that the data is displayed without these HTML tags. Thank you.
0 Likes
rbok78 Absent Member.
Absent Member.

Re: Exporting Test Cases with all steps to Excel

Jump to solution
Hi,

As far as I know, there is no QC method allowing you to export test cases without HTML tags. However, it cannot be difficult to write simple function that removes all HTML tags in some string. When you write this function, you can easily update the source code to fulfil your needs.

Good news is that it is possible to import strings including HTML tags back to QC. You don't need to update the exported string before you want to import the string back to QC. Test step details are stored as HTML in QC database 🙂

Hope this helps.
0 Likes
Veraison Absent Member.
Absent Member.

Re: Exporting Test Cases with all steps to Excel

Jump to solution
The code includes a vb line to remove html tags:
Set qc = CreateObject("TDApiOle80.TDConnection")qc.IgnoreHtmlFormat = True

If this does not work use this function written by Percy Bell:
'Strips all the HTML tags from a string.
'
'@param: strHTML A string with HTML tagges embedded.
'
'@return: A string with all HTML tags stripped.
Function stripHTML(strHTML)
'Strips the HTML tags from strHTML
Dim objRegExp, strOutput
Set objRegExp = New Regexp

objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = "<(.|\n)+?>"

'Replace all line breaks with VB line breaks
strOutput = Replace(strHTML, "
", vbLf)

'Replace all HTML tag matches with the empty string
strOutput = objRegExp.Replace(strOutput, "")

'Replace all <, >, and " with <, >, and "
strOutput = Replace(strOutput, "<", "<")
strOutput = Replace(strOutput, ">", ">")
strOutput = Replace(strOutput, """, Chr(34))

Set objRegExp = Nothing
stripHTML = strOutput 'Return the value of strOutput
End Function
0 Likes
Hello2K9 Absent Member.
Absent Member.

Re: Exporting Test Cases with all steps to Excel

Jump to solution
i dont understand why don you use excel reportS?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.