Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excel to HTML results
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi all,

I wrote a QTP script which is storing the output values in excel sheet, but my team asked us to write the script that will store the output results in HTML.I don't know anything about HTML.I am new to HTML.Can anyone help me how to write the HTML code to get the result in HTML format.[/size][/font]
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
If I were you, Here is what i would have done,

1. http://www.w3schools.com/html/ - This contains the starter set for you to understand HTML from the basics. Try to learn as much as you can, practice the code and probably try out a few tests based on the learnings.

2. A HTML is a file. You can read and write to it using the FileSystemObject. Learn about how FileSystemObject works, create a blank html file using the filesystemobject. If you know this already, you are one step ahead Smile

3. You will have to create a header before you start filling the rows. A header is a static data and it will need to be created once the file is created. For Eg:
Code:
Test_Case_ID  Description  Expected Result   Actual Result  Status

4. Here comes the difficult part - For each test case you execute you will have to write the results under the header. This is dynamic data. So you will have to parametrize the values you want each to appear. I suggest you write a function which will accept your dynamic values and fill them under the header.
Here is how it will look once you fill the data,
Code:
Test_Case_ID  Description  Expected Result   Actual Result  Status
TC_001           Fill values   values to be filled  Values filled     Pass
TC_002        check numeric Require Numeric    Not numeric    Fail

5. If you have completed step 4 then it is a cakewalk from here. You will have to fine tune your report.
5.1 Make sure for each execution it generates the report with a unique naming convention.( Ideally create with the time and date stamp)
5.2 Decide if you want to append the results.
5.3 Cosmetic modifications like Logo, Dashboard and execution time will have a good presentation effect.

And probably many more depending upon your creativity.

Give it a try and let me know if it helps you Smile
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Dynamic obj rep - get text in the class (html) marcio cravo moreira 0 2,127 05-26-2015, 06:58 PM
Last Post: marcio cravo moreira
  regular expression in html sujaravi123 0 2,310 12-31-2013, 03:00 PM
Last Post: sujaravi123
  if double quotes comes in outer html sujaravi123 3 6,846 10-18-2012, 10:16 AM
Last Post: harishshenoy
  Can I use html id as an unique identifier for all the components in a web page qtplearner88 8 8,499 05-21-2012, 06:52 PM
Last Post: falvi
  Identifying radio buttons with same html ID but dynamic webelement properties manishac 12 13,748 05-03-2012, 06:27 AM
Last Post: manishac

Forum Jump:


Users browsing this thread: 2 Guest(s)