From 03a173c9a19b5345080f90d724687761cdeb0fcd Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 10 Mar 2011 11:03:01 +0100 Subject: initial toxcreate tests added --- toxcreate.rb | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 toxcreate.rb (limited to 'toxcreate.rb') diff --git a/toxcreate.rb b/toxcreate.rb new file mode 100644 index 0000000..368101b --- /dev/null +++ b/toxcreate.rb @@ -0,0 +1,60 @@ +require 'rubygems' +require "rubygems" +require 'opentox-ruby' +require 'test/unit' +require 'watir-webdriver' + +class ToxCreateTest < Test::Unit::TestCase + def setup + @browser = Watir::Browser.new :firefox + @user = "test_ch" + @password = "test_ch" + end + +=begin + def test_login + end + + def teardown + @browser.close + end + +=end + def test_toxcreate + @browser.goto CONFIG[:services]["opentox-toxcreate"] + @browser.file_field(:id, "file").set(`pwd`.chomp+"/data/hamster_carcinogenicity.csv") + @browser.button(:value, "Create model").click + # wait until validation is completed + # check results (links, reports, results) + puts @browser.url + end + +=begin + def test_multi_cell_call + @browser.goto CONFIG[:services]["opentox-toxcreate"] + @browser.file_field(:id, "file").set(`pwd`.chomp+"/data/multi_cell_call.csv") + @browser.button(:value, "Create model").click + # wait until validation is completed + # check results (links, reports, results) + puts @browser.url + end + + def test_kazius + @browser.goto CONFIG[:services]["opentox-toxcreate"] + @browser.file_field(:id, "file").set(`pwd`.chomp+"/data/kazius.csv") + @browser.button(:value, "Create model").click + # wait until validation is completed + # check results (links, reports, results) + puts @browser.url + end + + def test_parallel_models + 10.times do + @browser.goto CONFIG[:services]["opentox-toxcreate"] + @browser.file_field(:id, "file").set(`pwd`.chomp+"/data/hamster_carcinogenicity.csv") + @browser.button(:value, "Create model").click + end + #@browser.close + end +=end +end -- cgit v1.2.3