Ifd_Automation 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/Ifd_Automation +34 -15
- data/bin/console +14 -0
- data/bin/documentation_generator.rb +119 -0
- data/bin/helper.rb +24 -19
- data/bin/setup +8 -0
- data/lib/Ifd_Automation.rb +2 -1
- data/lib/Ifd_Automation/all_steps.rb +8 -0
- data/lib/Ifd_Automation/database_steps.rb +106 -0
- data/lib/Ifd_Automation/email_steps.rb +67 -82
- data/lib/Ifd_Automation/file_steps.rb +30 -0
- data/lib/Ifd_Automation/{javascript_handling_steps.rb → javascript_steps.rb} +1 -2
- data/lib/Ifd_Automation/required_libs.rb +7 -0
- data/lib/Ifd_Automation/response.rb +105 -0
- data/lib/Ifd_Automation/ssh_steps.rb +47 -0
- data/lib/Ifd_Automation/version.rb +3 -5
- data/lib/Ifd_Automation/web_steps.rb +293 -0
- data/lib/Ifd_Automation/webservice_steps.rb +261 -0
- data/lib/{Ifd_Automation/methods/IFD_Assertion_methods.rb → Ifd_Automation_support/assertion_helpers.rb} +0 -1
- data/lib/Ifd_Automation_support/connection_helpers.rb +14 -0
- data/lib/{Ifd_Automation/methods → Ifd_Automation_support}/core.rb +103 -34
- data/lib/{Ifd_Automation/methods/javascript_handling_methods.rb → Ifd_Automation_support/javascript_helpers.rb} +0 -1
- data/lib/Ifd_Automation_support/mail_helpers.rb +17 -0
- data/lib/Ifd_Automation_support/selenium_sync_issues.rb +62 -0
- data/lib/{Ifd_Automation/methods/web_methods.rb → Ifd_Automation_support/web_steps_helpers.rb} +6 -1
- data/project/Gemfile +1 -19
- data/project/Gemfile.lock +203 -0
- data/project/features/TestData/globalData.yml +3 -11
- data/project/features/TestData/sshtest.txt +2 -0
- data/project/features/TestData/testfile.sql +2 -0
- data/project/features/{TestData/DownloadFolder/test.txt → TestSuite/test} +0 -0
- data/project/features/step_definitions/lib_steps/test.rb +16 -0
- data/project/features/step_definitions/repositories/project_object.yml +6 -6
- data/project/features/support/env.rb +46 -68
- data/project/features/support/project_config.yml +6 -37
- metadata +231 -51
- data/lib/Ifd_Automation/assertion_steps.rb +0 -96
- data/lib/Ifd_Automation/lib_file_steps.rb +0 -54
- data/lib/Ifd_Automation/lib_schema_data_steps.rb +0 -115
- data/lib/Ifd_Automation/lib_web_steps.rb +0 -184
- data/lib/Ifd_Automation/lib_webservice_steps.rb +0 -44
- data/lib/Ifd_Automation/methods/IFD_Connection.rb +0 -28
- data/lib/Ifd_Automation/methods/IFD_email_methods.rb +0 -16
- data/lib/Ifd_Automation/methods/IFD_webservice.rb +0 -17
- data/lib/Ifd_Automation/methods/database_methods.rb +0 -25
- data/lib/Ifd_Automation/methods/db_utils.rb +0 -37
- data/lib/Ifd_Automation/methods/error_handling_methods.rb +0 -87
- data/lib/Ifd_Automation/methods/lib_var.rb +0 -59
- data/lib/Ifd_Automation/methods/misc_methods.rb +0 -33
- data/lib/Ifd_Automation/methods/required_files.rb +0 -33
- data/lib/Ifd_Automation/methods/util.rb +0 -168
- data/lib/Ifd_Automation/methods/web_service_methods.rb +0 -63
- data/project/config/cucumber.yml +0 -3
- data/project/features/TestData/ExpectedDataFile/test.txt +0 -0
- data/project/features/TestData/SqlScript/test.sql +0 -0
- data/project/features/TestData/actual_images/infodation.jpg +0 -0
- data/project/features/TestData/expected_images/infodation.jpg +0 -0
- data/project/features/TestData/image_difference/infodation.jpg +0 -0
- data/project/features/TestData/screenshots/infodation.jpg +0 -0
- data/project/features/TestSuite/Login/login.feature +0 -11
- data/project/features/step_definitions/lib_steps/login_steps.rb +0 -16
@@ -1,63 +0,0 @@
|
|
1
|
-
# require 'rest-client'
|
2
|
-
class WebServiceMethods
|
3
|
-
|
4
|
-
def self.get_response_code(url, timeout)
|
5
|
-
response = HTTParty.get url, {timeout => timeout}
|
6
|
-
return response.code
|
7
|
-
end
|
8
|
-
|
9
|
-
def self.url_reach? (url, timeout)
|
10
|
-
response_code = get_response_code(url, timeout)
|
11
|
-
if response_code/10 ==2
|
12
|
-
return true
|
13
|
-
else
|
14
|
-
return false
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.send_put_request(url, data)
|
19
|
-
begin
|
20
|
-
response = HTTParty.put url, {:body => data, :timeout => 180000}
|
21
|
-
return response
|
22
|
-
rescue => e
|
23
|
-
raise "*** ERROR: when sending put request to '#{url}'. Info: \n\n #{e.message}"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
def self.send_post_request(url, data)
|
28
|
-
begin
|
29
|
-
puts "*** #{'WebServiceMethods.send_post_request.url'.ljust(47,' ')}: #{url}"
|
30
|
-
puts "WebServiceMethods.send_post_request.data: #{data}"
|
31
|
-
response = HTTParty.post url, {:body => data, :timeout => 180000}
|
32
|
-
return response
|
33
|
-
rescue => e
|
34
|
-
raise "*** ERROR: when sending put request to '#{url}'. Info: \n\n #{e.message}"
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
def self.send_XML_post_request(url, data)
|
39
|
-
begin
|
40
|
-
# puts "*** #{'WebServiceMethods.send_post_request.url'.ljust(47,' ')}: #{url}"
|
41
|
-
# puts "WebServiceMethods.send_post_request.data: #{data}"
|
42
|
-
response = RestClient.post url, data, :content_type => "text/xml", :timeout => 180000
|
43
|
-
return response
|
44
|
-
rescue => e
|
45
|
-
raise "*** ERROR: when sending put request to '#{url}'. Info: \n\n #{e.message}"
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
def self.send_get_request(url)
|
50
|
-
begin
|
51
|
-
response = HTTParty.get url, timeout: 180000
|
52
|
-
return response
|
53
|
-
rescue => e
|
54
|
-
raise "*** ERROR: when sending get request to '#{url}'. Info: \n\n #{e.message}"
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
def self.verify_response(reponse)
|
59
|
-
if response.code/100 != 2
|
60
|
-
raise "*** ERROR: when processing the request. More info: \n\n #{response.body.to_s}"
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
data/project/config/cucumber.yml
DELETED
File without changes
|
File without changes
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,11 +0,0 @@
|
|
1
|
-
#Feature: Create a new user
|
2
|
-
# In order to create new user account
|
3
|
-
# As a admin role
|
4
|
-
# I want to create new user account
|
5
|
-
# So that new user can be created successfully
|
6
|
-
# Scenario: Create a new user
|
7
|
-
# Given I am logged in to admin page
|
8
|
-
# When I create a new user named AnhPham
|
9
|
-
# Then I should see that a user named AnhPham exists
|
10
|
-
#
|
11
|
-
#
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# Given "I am logged in to admin page" do
|
2
|
-
# step %{I am on Admin Login Page}
|
3
|
-
# step %{I set text on "textbox_username" with "adminuser"}
|
4
|
-
# step %{I set text on "textbox_password" with "password@123"}
|
5
|
-
# step %{I click on "button_login"}
|
6
|
-
# step %{I wait for 3 seconds}
|
7
|
-
# end
|
8
|
-
#
|
9
|
-
# When "I create a new user named $name" do |name|
|
10
|
-
# step %{I set text on "textbox_newUserName" with "#{name}"}
|
11
|
-
# step %{I click on "button_createNewUser"}
|
12
|
-
# end
|
13
|
-
#
|
14
|
-
# Then "I should see that a user named $name exists" do |name|
|
15
|
-
# step %{I check property "label_message" has value "#{name}"}
|
16
|
-
# end
|