Test Results in HTML Report File

565 views
Skip to first unread message

Ma St

unread,
Jan 6, 2015, 2:35:35 PM1/6/15
to watir-...@googlegroups.com
I have created a ruby script and am attempting to understand how to generate an HTML results file.  I am using Test:Unit for the Framework.  I have searched on Google, but the sites refer to something called "OpenQA" that no longer exists. 
 
If I am doing functional automation with Watir, is Test:Unit the best framework?  If so, how do I generate a HTML file from my assert and If validation statements?
 
Thanks.

Selenium Framework

unread,
Jan 6, 2015, 2:43:24 PM1/6/15
to watir-...@googlegroups.com
You can use Cucumber as a test framework and that works very well with watir/selenium. The html reports, screenshots etc. are all available with just a config setting. See this post if it helps - http://www.seleniumframework.com/basic-tutorial/html-reports/

Anisha Narang

unread,
Jan 6, 2015, 3:35:37 PM1/6/15
to watir
You could try using rspec or Cucumber along with watir webdriver which will help you generate HTML reports.

--
--
Before posting, please read http://watir.com/support. In short: search before you ask, be nice.
 
watir-...@googlegroups.com
http://groups.google.com/group/watir-general
watir-genera...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-genera...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Regards,
Anisha Narang

Ma St

unread,
Jan 6, 2015, 3:52:20 PM1/6/15
to watir-...@googlegroups.com
Hi.  Yes, I used the following in my script:
 
require "rubygems"
require "watir-webdriver"
require "rspec"
require "selenium-webdriver"
require "rspec/expectations"
require "test/unit"
require "logger"
 
I then run from the command prompt:  rspec -f TestResearch.rb > results.html
 
I get the following result. 
 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.7/lib/rspec/core/formatters.rb:168:in
`find_formatter': Formatter 'TestResearch.rb' unknown - maybe you meant 'documentation' o
r 'progress'?. (ArgumentError)
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.7/lib/rspec/core/formatte
rs.rb:127:in `add'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.7/lib/rspec/core/configur
ation.rb:672:in `add_formatter'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.7/lib/rspec/core/configur
ation_options.rb:108:in `block in load_formatters_into'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.7/lib/rspec/core/configur
ation_options.rb:108:in `each'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.7/lib/rspec/core/configur
ation_options.rb:108:in `load_formatters_into'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.7/lib/rspec/core/configur
ation_options.rb:24:in `configure'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.7/lib/rspec/core/runner.r
b:95:in `setup'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.7/lib/rspec/core/runner.r
b:84:in `run'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.7/lib/rspec/core/runner.r
b:69:in `run'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.7/lib/rspec/core/runner.r
b:37:in `invoke'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-3.1.7/exe/rspec:4:in `<top (r
equired)>'
        from C:/Ruby193/bin/rspec:23:in `load'
        from C:/Ruby193/bin/rspec:23:in `<main>'

Oscar Rieken

unread,
Jan 6, 2015, 4:05:07 PM1/6/15
to watir-...@googlegroups.com
I would suggest you ask in the test unit user group, or try searching for test unit reporting, as this question really has nothing to do with Watir

Oscar Rieken

unread,
Jan 6, 2015, 4:07:05 PM1/6/15
to watir-...@googlegroups.com
You can use Watir with any unit testing framework, I think the best unit testing framework to use is one that the team understands. 

Oscar Rieken

unread,
Jan 7, 2015, 6:42:41 AM1/7/15
to watir-...@googlegroups.com
On Tue, Jan 6, 2015 at 2:43 PM, Selenium Framework <seleniu...@gmail.com> wrote:
You can use Cucumber as a test framework and that works very well with watir/selenium.
The html reports, screenshots etc. are all available with just a config setting. See this post if it helps - http://www.seleniumframework.com/basic-tutorial/html-reports/


On Tuesday, January 6, 2015 2:35:35 PM UTC-5, Ma St wrote:
I have created a ruby script and am attempting to understand how to generate an HTML results file.  I am using Test:Unit for the Framework.  I have searched on Google, but the sites refer to something called "OpenQA" that no longer exists. 
 
If I am doing functional automation with Watir, is Test:Unit the best framework?  If so, how do I generate a HTML file from my assert and If validation statements?
 
Thanks.

--
Reply all
Reply to author
Forward
0 new messages