lib/scoutui/eyes/eye_scout.rb in scoutui-2.0.1 vs lib/scoutui/eyes/eye_scout.rb in scoutui-2.0.2
- old
+ new
@@ -1,7 +1,8 @@
-require 'eyes_selenium'
-require 'testmgr'
+#require 'eyes_selenium'
+#require 'testmgr'
+require 'httparty'
module Scoutui::Eyes
class EyeScout
@@ -166,12 +167,19 @@
Scoutui::Logger::LogMgr.instance.info " Eyes.TestResults.Passed : #{@testResults.passed?.to_s}"
Scoutui::Logger::LogMgr.instance.info " Eyes.TestResults.Steps : #{@testResults.steps.to_s}"
end
Scoutui::Logger::LogMgr.instance.info " TestReport => #{@testResults}"
- # Testmgr::TestReport.instance.generateReport()
+
Testmgr::TestReport.instance.report()
+
+# Testmgr::TestReport.instance.generateReport()
+
+ metrics=Testmgr::TestReport.instance.getMetrics()
+ Scoutui::Logger::LogMgr.instance.info "Metrics => #{metrics}"
+
+ Scoutui::Utils::TestUtils.instance.setMetrics(metrics)
end
def getResults()
@testResults
end
@@ -182,26 +190,31 @@
@testResults=nil
browserType = Scoutui::Base::UserVars.instance.getBrowserType()
viewport_size = Scoutui::Base::UserVars.instance.getViewPort()
+ puts __FILE__ + (__LINE__).to_s + " browserType => #{browserType}"
+
+
Testmgr::TestReport.instance.setDescription('ScoutUI Test')
Testmgr::TestReport.instance.setEnvironment(:qa, Scoutui::Utils::TestUtils.instance.getHost())
+ Testmgr::TestReport.instance.setHost(Scoutui::Base::UserVars.instance.get(:host))
+ Testmgr::TestReport.instance.setBrowserUnderTest(browserType)
Testmgr::TestReport.instance.addRequirement('UI')
Testmgr::TestReport.instance.getReq('UI').add(Testmgr::TestCase.new('visible_when', "visible_when"))
Testmgr::TestReport.instance.addRequirement('Command')
Testmgr::TestReport.instance.getReq('Command').add(Testmgr::TestCase.new('isValid', "isValid"))
Testmgr::TestReport.instance.getReq('UI').add(Testmgr::TestCase.new('expectJsAlert', 'expectJsAlert'))
if Scoutui::Utils::TestUtils.instance.isDebug?
Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " setup() : #{browserType}"
- Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " sauce => " + Scoutui::Utils::TestUtils.instance.eyesEnabled?.to_s
+ Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " eyes => " + Scoutui::Utils::TestUtils.instance.eyesEnabled?.to_s
Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " viewport => #{viewport_size}"
Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " eyes cfg => #{@eyesRecord}"
- Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " title => " + Scoutui::Base::UserVars.instance.getVar('eyes.title')
- Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " app => " + Scoutui::Base::UserVars.instance.getVar('eyes.app')
- Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " match_level => " + Scoutui::Base::UserVars.instance.getVar('eyes.match_level')
+ Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " eyes.title => " + Scoutui::Base::UserVars.instance.getVar('eyes.title')
+ Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " eyes.app => " + Scoutui::Base::UserVars.instance.getVar('eyes.app')
+ Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " eyes.match_level => " + Scoutui::Base::UserVars.instance.getVar('eyes.match_level')
end
begin
# Scoutui::Base::QHarMgr.instance.start()
\ No newline at end of file