Module: AutoTest::Dsl
- Defined in:
- lib/dsl.rb
Class Method Summary collapse
-
.always_present(class_name, key, value) ⇒ Object
add an array of the classname, key and value of the object to be checked every cycle.
- .get_users_from_db(user_class_name, bool) ⇒ Object
-
.links_to_exclude(*links) ⇒ Object
set the links, that aren´t supposed to be clicked @*links List of two-element-arrays, first value link-text, second value link href.
-
.set_input(input, *values) ⇒ Object
for the name or part of the name of an input field, decide, which values to use if not set, random values matching the input type are used.
-
.set_login_attribute_names(names, fields) ⇒ Object
set the attribute_names and fields that are needed to login the argument is a list of pairs [attribute_name, field].
-
.set_login_data(*data) ⇒ Object
give data for logins, e.g.
-
.set_login_path(path) ⇒ Object
set the login path.
- .set_logout_path(path) ⇒ Object
-
.set_max_depth(value) ⇒ Object
set the maximal depth to which the links are clicked.
- .set_max_number_of_session_links(no) ⇒ Object
- .set_no_auth ⇒ Object
- .set_number_of_sessions(number) ⇒ Object
- .set_number_of_test_runs(number) ⇒ Object
-
.set_object_dependency(child, parent, attribute_name) ⇒ Object
for all objects of class child, there has to be one object of class parent attribute_name is the column that joins the two tables.
- .set_unique_login_attribute_name(name) ⇒ Object
- .stop_at_first_error(stop_at_first_error) ⇒ Object
Class Method Details
.always_present(class_name, key, value) ⇒ Object
add an array of the classname, key and value of the object to be checked every cycle
15 16 17 |
# File 'lib/dsl.rb', line 15 def always_present(class_name, key, value) Test.always_present(class_name, key, value) end |
.get_users_from_db(user_class_name, bool) ⇒ Object
41 42 43 |
# File 'lib/dsl.rb', line 41 def get_users_from_db(user_class_name, bool) Authentication.get_users_from_db(user_class_name, bool) end |
.links_to_exclude(*links) ⇒ Object
set the links, that aren´t supposed to be clicked @*links List of two-element-arrays, first value link-text, second value link href
10 11 12 |
# File 'lib/dsl.rb', line 10 def links_to_exclude(*links) Test.links_to_exclude(*links) end |
.set_input(input, *values) ⇒ Object
for the name or part of the name of an input field, decide, which values to use if not set, random values matching the input type are used
30 31 32 |
# File 'lib/dsl.rb', line 30 def set_input(input, *values) Test.set_input(input, *values) end |
.set_login_attribute_names(names, fields) ⇒ Object
set the attribute_names and fields that are needed to login the argument is a list of pairs [attribute_name, field]
71 72 73 74 75 |
# File 'lib/dsl.rb', line 71 def set_login_attribute_names(names, fields) Authentication.set_login_attribute_names(names, fields) Authentication.set_login_fields(fields) Authentication.set_login_names(names) end |
.set_login_data(*data) ⇒ Object
give data for logins, e.g. if the password for users is saved as salt and hash in the database the data has to be created in the test_seeds.rb file
37 38 39 |
# File 'lib/dsl.rb', line 37 def set_login_data(*data) Authentication.set_login_data(*data) end |
.set_login_path(path) ⇒ Object
set the login path
65 66 67 |
# File 'lib/dsl.rb', line 65 def set_login_path(path) Authentication.set_login_path(path) end |
.set_logout_path(path) ⇒ Object
77 78 79 |
# File 'lib/dsl.rb', line 77 def set_logout_path(path) Authentication.set_logout_path(path) end |
.set_max_depth(value) ⇒ Object
set the maximal depth to which the links are clicked
20 21 22 |
# File 'lib/dsl.rb', line 20 def set_max_depth(value) Test.set_max_depth(value) end |
.set_max_number_of_session_links(no) ⇒ Object
55 56 57 |
# File 'lib/dsl.rb', line 55 def set_max_number_of_session_links(no) Test.set_max_number_of_session_links(no) end |
.set_no_auth ⇒ Object
60 61 62 |
# File 'lib/dsl.rb', line 60 def set_no_auth Test.set_no_auth end |
.set_number_of_sessions(number) ⇒ Object
51 52 53 |
# File 'lib/dsl.rb', line 51 def set_number_of_sessions(number) Test.set_number_of_sessions(number) end |
.set_number_of_test_runs(number) ⇒ Object
85 86 87 |
# File 'lib/dsl.rb', line 85 def set_number_of_test_runs(number) Test.set_number_of_test_runs(number) end |
.set_object_dependency(child, parent, attribute_name) ⇒ Object
for all objects of class child, there has to be one object of class parent attribute_name is the column that joins the two tables
47 48 49 |
# File 'lib/dsl.rb', line 47 def set_object_dependency(child, parent, attribute_name) Test.set_object_dependency(child, parent, attribute_name) end |
.set_unique_login_attribute_name(name) ⇒ Object
24 25 26 |
# File 'lib/dsl.rb', line 24 def set_unique_login_attribute_name(name) Authentication.set_unique_login_attribute_name(name) end |
.stop_at_first_error(stop_at_first_error) ⇒ Object
81 82 83 |
# File 'lib/dsl.rb', line 81 def stop_at_first_error(stop_at_first_error) Test.stop_at_first_error(stop_at_first_error) end |