diff options
author | gebele <gebele@in-silico.ch> | 2013-10-23 13:15:53 +0200 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2013-10-23 13:15:53 +0200 |
commit | 9591c1bd756d805870a0087e13ba2562fe4efc91 (patch) | |
tree | b51c7fdae011aba8c60e93b09a02fb19d79f188a | |
parent | 04221dcb67f019886f92fca1303544219fd29e56 (diff) | |
parent | b9045fa358dac0adb5fe2956f2c2b3e8cea03151 (diff) |
Merge branch 'development' of https://github.com/opentox/opentox-test into development
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | opentox-test.gemspec | 2 | ||||
-rw-r--r-- | test/lazarweb.rb | 35 | ||||
-rw-r--r-- | test/store_query.rb | 4 |
4 files changed, 25 insertions, 18 deletions
@@ -1,3 +1,3 @@ -source 'https://rubygems.org' +source 'http://rubygems.org' gemspec gem "opentox-client", :path => "../opentox-client" diff --git a/opentox-test.gemspec b/opentox-test.gemspec index 9515d91..df3494f 100644 --- a/opentox-test.gemspec +++ b/opentox-test.gemspec @@ -18,8 +18,6 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency 'minitest' gem.add_runtime_dependency "opentox-client" - gem.add_runtime_dependency 'capybara-webkit' - gem.add_runtime_dependency 'selenium-webdriver' gem.post_install_message = "Please configure test in ~/.opentox/config/test.rb" end diff --git a/test/lazarweb.rb b/test/lazarweb.rb index c6762c8..1a257b8 100644 --- a/test/lazarweb.rb +++ b/test/lazarweb.rb @@ -1,16 +1,25 @@ -require 'minitest/autorun' -require 'capybara/dsl' -require 'capybara-webkit' +require_relative "setup.rb" +#require 'capybara/dsl' +#require 'capybara-webkit' -Capybara.default_driver = :selenium -Capybara.default_wait_time = 20 -Capybara.javascript_driver = :webkit -Capybara.run_server = false -Capybara.app_host = 'https://services.in-silico.ch/predict' +#Capybara.default_driver = :webkit +#Capybara.default_wait_time = 20 +#Capybara.javascript_driver = :webkit +#Capybara.run_server = false +#Capybara.app_host = 'https://services.in-silico.ch/predict' class LazarWebTest < MiniTest::Test - i_suck_and_my_tests_are_order_dependent! - + #i_suck_and_my_tests_are_order_dependent! + + def test_online + response = `curl -ki http://services.in-silico.ch` + assert_match /301/, response + response = `curl -ki https://services.in-silico.ch` + assert_match /302/, response + assert_match /predict/, response + end + +=begin include Capybara::DSL def test_00_xsetup @@ -22,7 +31,7 @@ class LazarWebTest < MiniTest::Test visit('/') assert page.has_content?('Lazar Toxicity Predictions') end -=begin + def test_01_b_validate_html visit('/') html = page.source @@ -54,7 +63,7 @@ class LazarWebTest < MiniTest::Test first(:button, 'Check').click assert page.has_content?('Congratulations! No Error Found.'), "true" end -=end + def test_02_insert_wrong_smiles visit('/') page.fill_in 'identifier', :with => "blahblah" @@ -153,5 +162,5 @@ class LazarWebTest < MiniTest::Test def test_99_kill `pidof Xvfb|xargs kill` end - +=end end diff --git a/test/store_query.rb b/test/store_query.rb index 54cd02b..57dea14 100644 --- a/test/store_query.rb +++ b/test/store_query.rb @@ -48,7 +48,7 @@ class UploadTest < MiniTest::Test 50.times do |t| threads << Thread.new(t) do |up| #puts "Start Time >> " << (Time.now).to_s - response = `curl -0 -i -k -u #{$four_store[:user]}:#{$four_store[:password]} -T '#{File.join File.dirname(__FILE__),"data/toxbank-investigation/valid/BII-I-1-test.nt"}' '#{$four_store[:uri]}/data/?graph=#{$four_store[:user]}/test#{t}.n3'`.chomp + response = `curl -0 -i -k -u #{$four_store[:user]}:#{$four_store[:password]} -T '#{File.join File.dirname(__FILE__),"data/toxbank-investigation/valid/BII-I-1-test.nt"}' '#{$four_store[:uri]}/data/?graph=#{$four_store[:user]}/test#{t}.nt'`.chomp assert_match /201/, response end end @@ -73,7 +73,7 @@ class UploadTest < MiniTest::Test 50.times do |t| threads << Thread.new(t) do |up| #puts "Start Time >> " << (Time.now).to_s - response = `curl -i -k -u #{$four_store[:user]}:#{$four_store[:password]} -X DELETE '#{$four_store[:uri]}/data/#{$four_store[:user]}/test#{t}.n3'`.chomp + response = `curl -i -k -u #{$four_store[:user]}:#{$four_store[:password]} -X DELETE '#{$four_store[:uri]}/data/#{$four_store[:user]}/test#{t}.nt'`.chomp assert_match /200/, response end end |