Cukes C0 Coverage Information - Simploco - RCov

support/env.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
support/env.rb 61 33
100.00%
100.00%

Key

Code reported as executed by Ruby looks like this...and this: this line is also marked as covered.Lines considered as run by rcov, but not reported by Ruby, look like this,and this: these lines were inferred by rcov (using simple heuristics).Finally, here's a line marked as not executed.

Coverage Details

2 =begin
3 *Name           : env.rb
4 *Description    : requires the important classes/modules for application execution
5 *Author         : Chandra sekaran
6 *Creation Date  : 24/04/2015
7 *Updation Date  :
8 =end
9 
10 # Code Coverage report
11 # the cucumber run command should include the command line argument CODE_COVERAGE=yes (or true) in order to get code
12 # coverage report, which is a html report that pictorizes script LOC (Lines of COde) execution coverage
13 if !ENV["CODE_COVERAGE"].nil? && (["yes", "true"].include?(ENV["CODE_COVERAGE"].downcase))
14   require "simplecov"
15   require "simplecov-json"
16   require "simplecov-rcov"
17   SimpleCov.formatters = [
18       SimpleCov::Formatter::RcovFormatter
19   ]
20   #SimpleCov::Formatter::HTMLFormatter, SimpleCov::Formatter::JSONFormatter
21   SimpleCov.start
22 end
23 
24 require "rubygems"
25 require "page-object"
26 require "watir-webdriver"
27 require "yaml"
28 require "logger"
29 require "fileutils"
30 require "time_difference"
31 require "data_magic"
32 require "require_all"
33 require "nokogiri"
34 require "open3"    # for capturing STDOUT, STDERR messages
35 require "json"     # for json file manipulation in performance report
36 require "dbi" if ENV["PLATFORM"].downcase == "desktop"  # for db Sybase - performance report data store
37 require "appium_lib" if ENV["PLATFORM"].downcase == "mobile"  # for mobile automation
38 
39 require_all "library"
40 require_all "object_repository"
41 
42 World(PageObject::PageFactory)   # make PageObject available throughout the application
43 
44 # environment variables moved to constants that is available throughout the application
45 PLATFORM = ENV["PLATFORM"] || nil     # for platform if desktop/mobile
46 BROWSER = ENV["BROWSER"] || nil       # for browser if firefox/chrome/internet_explorer/safari/android
47 BOX = ENV["BOX"] || nil               # for box name having multiple profiles
48 DEVICE = ENV["DEVICE"] || nil         # for mobile device if it is attached to the machine
49 
50 # for resetting the profiles (in config.yml) the cucumber run command line argument should include RESET_CONFIG_VALUES=yes (or true)
51 # which will reset all the profiles
52 RESET_CONFIG_VALUES = ENV["RESET_CONFIG_VALUES"] || nil
53 
54 $REPORT_FILE_NAME = "report_#{$$}"    # name of the cucumber generated report file (appended with process id as unique value)
55 
56 # validating command environment variables
57 raise "Command Line Exception : PLATFORM can not be nil" if PLATFORM.nil?
58 raise "Command Line Exception : BROWSER can not be nil" if BROWSER.nil?
59 
60 PageObject.javascript_framework = :jquery  # for handling AJAX
61 
62 World(CUKES::PageUtils)  # make PageUtils methods global to entire TAF

Generated on 2015-05-08 10:40:30 +0530 with SimpleCov-RCov 0.2.3