Class: AutoTest::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/auto_test.rb

Instance Method Summary collapse

Constructor Details

#initialize ⇒ Configuration

Returns a new instance of Configuration.



23
24
25
26
27
28
29
# File 'lib/auto_test.rb', line 23

def initialize        
  Test.initialize_test
  Rails.logger.level = 1
  DatabaseCleaner.strategy = :truncation
  DatabaseCleaner.start
  DatabaseCleaner.clean
end

Instance 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



46
47
48
# File 'lib/auto_test.rb', line 46

def always_present(class_name, key, value)
  Dsl.always_present(class_name, key, value)
end

#get_users_from_db(user_class_name, bool) ⇒ Object



50
51
52
# File 'lib/auto_test.rb', line 50

def get_users_from_db(user_class_name, bool)
  Dsl.get_users_from_db(user_class_name, bool)
end


33
34
35
# File 'lib/auto_test.rb', line 33

def links_to_exclude(*links)
  Dsl.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



64
65
66
# File 'lib/auto_test.rb', line 64

def set_input(input, *values)
  Dsl.set_input(input, *values)
end

#set_login_attribute_names(logins, fields) ⇒ Object

set the attribute_names and fields that are needed to login the argument is a list of pairs [attribute_name, field]



81
82
83
# File 'lib/auto_test.rb', line 81

def (logins, fields)
  Dsl.(logins, fields)
end

#set_login_data(*data) ⇒ Object



58
59
60
# File 'lib/auto_test.rb', line 58

def (*data)
  Dsl.(*data)
end

#set_login_path(path) ⇒ Object

set the login path



75
76
77
# File 'lib/auto_test.rb', line 75

def (path)
  Dsl.(path)
end

#set_logout_path(path) ⇒ Object



93
94
95
# File 'lib/auto_test.rb', line 93

def set_logout_path(path)
  Dsl.set_logout_path(path)
end

#set_max_depth(value) ⇒ Object



37
38
39
# File 'lib/auto_test.rb', line 37

def set_max_depth(value)
  Dsl.set_max_depth(value)
end


85
86
87
# File 'lib/auto_test.rb', line 85

def set_max_number_of_session_links(no)
  Dsl.set_max_number_of_session_links(no)
end

#set_no_auth ⇒ Object



89
90
91
# File 'lib/auto_test.rb', line 89

def set_no_auth
  Dsl.set_no_auth
end

#set_number_of_sessions(number) ⇒ Object



41
42
43
# File 'lib/auto_test.rb', line 41

def set_number_of_sessions(number)
  Dsl.set_number_of_sessions(number)
end

#set_number_of_test_runs(number) ⇒ Object



101
102
103
# File 'lib/auto_test.rb', line 101

def set_number_of_test_runs(number)
  Dsl.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



70
71
72
# File 'lib/auto_test.rb', line 70

def set_object_dependency(child, parent, attribute_name)
  Dsl.set_object_dependency(child, parent, attribute_name)
end

#set_unique_login_attribute_name(name) ⇒ Object



54
55
56
# File 'lib/auto_test.rb', line 54

def (name)
  Dsl.(name)
end

#stop_at_first_error(stop_at_first_error) ⇒ Object



97
98
99
# File 'lib/auto_test.rb', line 97

def stop_at_first_error(stop_at_first_error) 
  Dsl.stop_at_first_error(stop_at_first_error) 
end