[wtr-general] Re: Need to print results of Mulitple scripts in one HTML file

2009-10-08 Thread Prajakta Jadhav
Sorry Bindhu, I have never used CLReport. so can't help you on it.
Though I can share with you the sample script that I use. It goes as follows
->

  def open_log_file(log_name)
if(File.exist?(log_name))   #If the log file already
exists, attach the new results to it
  @@log = File.open(log_name,"a")  #Log the test details in Log.html
file
  @@log.puts("")
else   #If the log file
does not already exist, create a new file
  @@log = File.open(log_name,"a")  #Log the test details in Log.html
file
  @@log.puts("")
  @@log.puts("")
end
  end

  def log_pass(summary, description, result)

@@log.puts("#{summary}#{description}#{result}Pass") #Log success
  end

  def log_fail(summary, description, result)

@@log.puts("#{summary}#{description}#{result}Fail") #Log failure
  end

  def test_01_new_test
open_log_file("Test_Results.html")
@@log.puts("Test For Forgot Password
Functionality")
log_pass("Test_Forgot_Password", "Sending mail for forgot password",
"Successful") #Log Success
log_fail("Test_Forgot_Password", "Sending mail for forgot password",
"Failed") #Log Failure
  end

-Prajakta


On Fri, Oct 9, 2009 at 11:36 AM, Bindhu  wrote:

>
> Thanks Prajakta and Rohan for ur quick reply,
> And sorry to bother you again...
>
> I the below code in every script
>
> r = CLReport.new()
> testReport = r.createReport('D:\\Automation\\ReportName')
>
>< Script to be executed>>
>
> end
> r.addtoReport("testReport","TC_001", 'PASSED', "New Account Created
> for Regular Savings,Personal (10) and class code of Individual with
> Account No :")
> r.finishReport(testReport)
> rescue
>   r.addtoReport(testReport, 'Test crashed with reason '+$!, 'FAILED',
> 'Test crashed!')
>  r.finishReport(testReport)
>
> And based on ur sugesstion I m trying to use CLReport.open(). But it
> is not working. Please extend ur help.
>
> Rohan,
> I m really not aware what is rake.Can you please provide me some
> example.
>
> Thanks in Advance
>
> On Oct 9, 10:20 am, Prajakta Jadhav  wrote:
> > Shouldn't be a problem. Open the same html file in both the scripts for
> > logging the results. It will log the results one after another in the
> same
> > html file.
> >
> > -Prajakta
> >
> >
> >
> > On Fri, Oct 9, 2009 at 10:31 AM, Bindhu 
> wrote:
> >
> > > Hi All,
> >
> > > In batch file I have included 2 scripts to be executed. After a
> > > successful execution of this batch I want to print the results in one
> > > HTML file.
> > > As of now I am able to print the one HTML file for one script. But I
> > > want a single HTML file to be printed for multiple scripts which I
> > > have inculded on batch file.
> > > Please guide me.
> >
> > > Right now I am using the code which is available in wiki..
> >
> > > Thanks- Hide quoted text -
> >
> > - Show quoted text -
>  >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Need to print results of Mulitple scripts in one HTML file

2009-10-08 Thread Bindhu

Thanks Prajakta and Rohan for ur quick reply,
And sorry to bother you again...

I the below code in every script

r = CLReport.new()
testReport = r.createReport('D:\\Automation\\ReportName')

< Script to be executed>>

end
r.addtoReport("testReport","TC_001", 'PASSED', "New Account Created
for Regular Savings,Personal (10) and class code of Individual with
Account No :")
r.finishReport(testReport)
rescue
   r.addtoReport(testReport, 'Test crashed with reason '+$!, 'FAILED',
'Test crashed!')
  r.finishReport(testReport)

And based on ur sugesstion I m trying to use CLReport.open(). But it
is not working. Please extend ur help.

Rohan,
I m really not aware what is rake.Can you please provide me some
example.

Thanks in Advance

On Oct 9, 10:20 am, Prajakta Jadhav  wrote:
> Shouldn't be a problem. Open the same html file in both the scripts for
> logging the results. It will log the results one after another in the same
> html file.
>
> -Prajakta
>
>
>
> On Fri, Oct 9, 2009 at 10:31 AM, Bindhu  wrote:
>
> > Hi All,
>
> > In batch file I have included 2 scripts to be executed. After a
> > successful execution of this batch I want to print the results in one
> > HTML file.
> > As of now I am able to print the one HTML file for one script. But I
> > want a single HTML file to be printed for multiple scripts which I
> > have inculded on batch file.
> > Please guide me.
>
> > Right now I am using the code which is available in wiki..
>
> > Thanks- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Need to print results of Mulitple scripts in one HTML file

2009-10-08 Thread Rohan Ojha
Hi,

 

Another alternative would be to call the HTML report class from the rake
itself rather than individual scripts. (just an alternate suggestion :-))

 

Thanks,
Rohan Ojha
 Blue Star Infotech l*+91 900 4955058l * +91 22 6688 6969 l 6 +91 22 6688
6999 l *  <mailto:rohan.o...@bsil.com> rohan.o...@bsil.com
   <http://www.bsil.com/> www.bsil.com - Where Partnerships Are Built on
Trust 

 

 

  _  

From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com]
On Behalf Of Prajakta Jadhav
Sent: Friday, October 09, 2009 10:50 AM
To: watir-general@googlegroups.com
Subject: [wtr-general] Re: Need to print results of Mulitple scripts in one
HTML file

 

Shouldn't be a problem. Open the same html file in both the scripts for
logging the results. It will log the results one after another in the same
html file.

 

-Prajakta

On Fri, Oct 9, 2009 at 10:31 AM, Bindhu  wrote:


Hi All,

In batch file I have included 2 scripts to be executed. After a
successful execution of this batch I want to print the results in one
HTML file.
As of now I am able to print the one HTML file for one script. But I
want a single HTML file to be printed for multiple scripts which I
have inculded on batch file.
Please guide me.

Right now I am using the code which is available in wiki..

Thanks





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Need to print results of Mulitple scripts in one HTML file

2009-10-08 Thread Prajakta Jadhav
Shouldn't be a problem. Open the same html file in both the scripts for
logging the results. It will log the results one after another in the same
html file.

-Prajakta

On Fri, Oct 9, 2009 at 10:31 AM, Bindhu  wrote:

>
> Hi All,
>
> In batch file I have included 2 scripts to be executed. After a
> successful execution of this batch I want to print the results in one
> HTML file.
> As of now I am able to print the one HTML file for one script. But I
> want a single HTML file to be printed for multiple scripts which I
> have inculded on batch file.
> Please guide me.
>
> Right now I am using the code which is available in wiki..
>
> Thanks
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---