Results 1 to 4 of 4

Thread: Shows subject and test name, but all steps are missing

  1. #1
    Geek_Guest
    Guest

    Shows subject and test name, but all steps are missing

    Hi,

    I am trying to import a test case written in excel to mercury quality centre 9.0. I have already installed mercury quality center 9.0 microsoft excel add in. I have formatted my test case in excel sheet as given in the help document of mercury quality center 9.0 microsoft excel add in. When i run the export to quality centre macro in excel then i get a success message as " you have successfully exported the microsoft excel worksheet to quality centre". I click finish and then when i verify the exported file in testdirector then it only shows the subject and test name but the all the steps are missing. Do anyone have any idea as to why this is happening?


    question asked by visitor chandan banerjee

    Last edited by Geek_Guest; 05-19-2007 at 05:36 AM.

  2. #2
    Banned
    Join Date
    Oct 2007
    Answers
    173

    Re: Shows subject and test name, but all steps are missing

    You can refer to "Microsoft Excel 2000 Visual Basic for Applications object model" for a complete listing of Excel methods and properties that can be used within a QuickTest Professional (QTP) script. You can use these Excel object methods within a QTP script to create workbooks, create new sheets, input data, etc.
    For a complete listing of Excel object's methods and properties, refer to MSDN Library - Microsoft Excel Object Model (http://msdn.microsoft.com/library/de...pplication.asp).
    The following is a sub-procedure that uses Excel object methods to output data from a dictionary object to an Excel file. Attached you will find a working example of a QuickTest Professional test that uses the sub-procedure below. The example will retrieve information from a webpage and output it to an Excel file (info.xls) using the ReportInformation sub-procedure.
    In order to run the test, unzip the attached file to a temporary folder, and start QTP with web support loaded:
    CPT31467.zip
    Example:
    Sub ReportInformation(dictionary, filename)
    ' create the Excel object
    Set ExcelObj = CreateObject("Excel.Application")

    ' add a new Workbooks and a new Sheet
    ExcelObj.Workbooks.Add

    Set NewSheet = ExcelObj.Sheets.Item(1)
    NewSheet.Name = "Page Information"

    ' loop through all the information in the Dictionary object
    ' and report it to the Excel sheet
    row = 1

    For Each key In dictionary.keys
    NewSheet.Cells(row,1) = key
    NewSheet.Cells(row,2) = dictionary(key)
    row = row + 1
    Next

    ' customize the Sheet layout
    NewSheet.Columns("A:A").ColumnWidth = 20
    NewSheet.Columns("A:A").Font.Bold = True
    NewSheet.Columns("B:B").ColumnWidth = 60
    NewSheet.Columns("B:B").HorizontalAlignment = -4108 ' xlCenter

    ' save the Excel file
    ExcelObj.ActiveWorkbook.SaveAs filename

    ' close the application and clean the object
    ExcelObj.Quit
    Set ExcelObj = Nothing
    End Sub


  3. #3
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    Re: Shows subject and test name, but all steps are missing

    Hi,

    I Guess this is attributed to the reason that you have not created a TestMap which Maps all your Excel fields / Testcase fields to those in TD.

    Subject, TestName are Mandatory fields which already are part of Testmap and hence these get reflected. Select each listed field from TD and Map it to the concerned Field in Excel. You would find columns like TestStepDescription, StepName, TestData, ExpectedResults etc displayed in the TestMap.

    Save the created Map and you can select the same for all other testcases as well.

    Cheers...


  4. #4
    Contributing Member
    Join Date
    Feb 2008
    Answers
    59

    Re: Shows subject and test name, but all steps are missing

    Hi,
    I guess u hadn't merged the cells Subject.....for example if we have TestName 1 and if it has steps like a,b,c then we need to merge the three rows of Subject and TestName.Then you can give ur stepname,step description,expected results etc.I hope this will help you.

    Thanks
    Deepika.P


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact