Altered to run in sequence on the integration test

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3470 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
PriestJ
2008-02-05 16:04:35 +00:00
parent 78ba3ccab8
commit b1bbafd416
8 changed files with 33 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ class Test_05_base_screen < Test::Unit::TestCase
def test_01_bases_screen_appears
@@ie.goto(BASE)
#we'll need to login
login(DK, DK_PWD)
login(MIPADMIN, MIPADMIN_PWD)
assert(@@ie.contains_text('Bases'),'The bases screen did not appear')
assert(@@ie.contains_text('Base Description'),'The base description column did not appear')
assert(@@ie.contains_text('Depth'),'The Depth column did not appear')
@@ -300,6 +300,12 @@ class Test_05_base_screen < Test::Unit::TestCase
assert(@@ie.contains_text('Error'),'An error was not generated')
end
def test_50_logout
menu('Logout')
assert(@@ie.button(:value, 'Login').exists?,'The Login button was not available')
@@ie.button(:value, 'Login').click
@@ie.wait
end
end

View File

@@ -29,6 +29,7 @@ LOGIN = PROTOCOL+MACHINE+'/'+DAD+'/f?p='+APPLICATIONID+':101'
EXPORT_DATA = PROTOCOL+MACHINE+'/'+DAD+'/f?p='+APPLICATIONID+':5'
ENQUIRY = PROTOCOL+MACHINE+'/'+DAD+'/f?p='+APPLICATIONID+':32'
BASE = PROTOCOL+MACHINE+'/'+DAD+'/f?p='+APPLICATIONID+':50'
HOUSING = PROTOCOL+MACHINE+'/'+DAD+'/f?p='+APPLICATIONID+':54'
#URLs for party management screens
MANAGE_PARTIES = PROTOCOL+MACHINE+'/'+DAD+'/f?p=' +APPLICATIONID+ ':60'
CREATE_PARTY = PROTOCOL+MACHINE+'/'+DAD+'/f?p=' +APPLICATIONID+ ':61'

View File

@@ -1,7 +1,7 @@
#---
#This unit test checks the drawings screen.
#---
class Test_02_drawings_screen < Test::Unit::TestCase
class Test_04_drawings_screen < Test::Unit::TestCase
#
#Test we can logon to the system using the webmip administrator user<65>s login credentials and check that
#all the columns required for the report appears with the button to create a new drawings record

View File

@@ -4,7 +4,7 @@
#may have some issues with the file downloads as I'm not sure how
#we handle these with ie and watir
#---
class Test_01_export_data < Test::Unit::TestCase
class Test_07_export_data < Test::Unit::TestCase
#
#Test we can logon to the system using the webmip administrator user<65>s login credentials
#

View File

@@ -9,7 +9,7 @@ class Test_03_housings_screen < Test::Unit::TestCase
def test_01_housing_screen_appears
@@ie.goto(HOUSING)
#we'll need to login
login(DK, DK_PWD)
login(MIPADMIN, MIPADMIN_PWD)
assert(@@ie.contains_text('Housings'),'The housing screen did not appear')
assert(@@ie.contains_text('Housing Code'),'The housing code column did not appear')
assert(@@ie.contains_text('Housing Type'),'The housing type column did not appear')
@@ -248,7 +248,12 @@ class Test_03_housings_screen < Test::Unit::TestCase
#~ assert_nil(@@ie.contains_text('ACTARIS'),'The new record with manufacturer dresser did appear')
#~ assert(@@ie.contains_text('Error'),'An error was not generated')
#~ end
def test_50_logout
menu('Logout')
assert(@@ie.button(:value, 'Login').exists?,'The Login button was not available')
@@ie.button(:value, 'Login').click
@@ie.wait
end
end

View File

@@ -1,7 +1,7 @@
#---
#This unit test checks the modules screen.
#---
class Test_04_modules_screen < Test::Unit::TestCase
class Test_08_modules_screen < Test::Unit::TestCase
#
#Test we can logon to the system using the webmip administrator user<65>s login credentials and check that
#all the columns required for the report appears with the button to create a new module record

View File

@@ -21,7 +21,7 @@
# - test_02_edit_users
# - test_03_edit_suppliers
#---
class Test_07_MIPADMIN_party_management< Test::Unit::TestCase
class Test_09_MIPADMIN_party_management< Test::Unit::TestCase
#
#Test we can logon to the system using the webmip administrator user<65>s login credentials and check that
#all the fields required for creating parties in the system are correctly displayed.
@@ -465,7 +465,7 @@ class Test_07_MIPADMIN_party_management< Test::Unit::TestCase
end
end
class Test_08_SUPPADMIN_party_management< Test::Unit::TestCase
class Test_10_SUPPADMIN_party_management< Test::Unit::TestCase
#
#Test we can create a user (AGENT) in the system when logged on as SUPPADMIN user.
#
@@ -522,7 +522,7 @@ class Test_08_SUPPADMIN_party_management< Test::Unit::TestCase
end
end
class Test_09_edit_parties< Test::Unit::TestCase
class Test_11_edit_parties< Test::Unit::TestCase
#
#Test we can edit a user (AGENT) in the system when logged on as MIPADMIN user.
#

View File

@@ -12,6 +12,7 @@ require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'test/unit/testsuite'
#include the integration test cases
require 'login_tests'
require 'exportdatatests'
#includes
@@ -47,7 +48,17 @@ include Watir
class WebMipIntegrationTests
def self.suite
suite = Test::Unit::TestSuite.new('webMIP Integration tests')
suite << Test_01_export_data.suite
suite << Test_01_login_screen.suite
suite << Test_02_enquiry.suite
suite << Test_03_housings_screen.suite
suite << Test_04_drawings_screen.suite
suite << Test_05_base_screen.suite
suite << Test_06_addon_screen.suite
suite << Test_07_export_data.suite
suite << Test_08_modules_screen.suite
suite << Test_09_MIPADMIN_party_management.suite
suite << Test_10_SUPPADMIN_party_management.suite
suite << Test_11_edit_parties.suite
#copy the line above, inserting your test to add
#more testcases into the integration test suite
return suite