rwebspec 6.2.0 → 6.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -0
- data/Rakefile +1 -1
- data/lib/plugins/testwise_plugin.rb +19 -10
- data/lib/rwebspec-webdriver/driver.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe3a0a083f9ec7923ca112fdcdf56d622859e6c6
|
4
|
+
data.tar.gz: 4dff3812fcf3995a6d5ca4a8182b6735dc88508e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98b92a1d388de81b48ad5703c687f926192fbd80713f6b13458fb0eb3fd9b490aa50376410f1dac4f1c6b3c3a098e21b52c168da8feaa7a0ccdffaa94cf9c905
|
7
|
+
data.tar.gz: e3ed768733939ac7d6dc918b46c995c4aec48f13c30c187d47573f4c28e6f75db5e3de1e3932178613d8f17a010069666977a027d436499a696b50a1d0d03c58
|
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
@@ -77,7 +77,7 @@ end
|
|
77
77
|
spec = Gem::Specification.new do |s|
|
78
78
|
s.platform= Gem::Platform::RUBY
|
79
79
|
s.name = "rwebspec"
|
80
|
-
s.version = "6.2.
|
80
|
+
s.version = "6.2.1"
|
81
81
|
s.summary = "Web application functional specification in Ruby"
|
82
82
|
s.description = "Executable functional specification for web applications in RSpec syntax with Watir or Selenium WebDriver"
|
83
83
|
|
@@ -14,7 +14,7 @@ module RWebSpec
|
|
14
14
|
return $TESTWISE_DEBUGGING && $TESTWISE_RUNNING_AS == "test_case"
|
15
15
|
end
|
16
16
|
|
17
|
-
def
|
17
|
+
def write_to_console(message)
|
18
18
|
Thread.pass
|
19
19
|
if (ENV["RUN_IN_TESTWISE"] && ENV["RUN_IN_TESTWISE"].to_s == "true" || $RUN_IN_TESTWISE) && message
|
20
20
|
the_sent_msg = message.to_s
|
@@ -26,7 +26,7 @@ module RWebSpec
|
|
26
26
|
puts message
|
27
27
|
end
|
28
28
|
end
|
29
|
-
alias write_to_console
|
29
|
+
alias debug write_to_console
|
30
30
|
|
31
31
|
|
32
32
|
# Support of TestWise to ajust the intervals between keystroke/mouse operations
|
@@ -88,24 +88,30 @@ module RWebSpec
|
|
88
88
|
end
|
89
89
|
|
90
90
|
|
91
|
-
def connect_to_testwise
|
91
|
+
def connect_to_testwise(message_type, body)
|
92
92
|
Thread.pass
|
93
|
+
testwise_port = $TESTWISE_TRACE_PORT || ENV["TESTWISE_TRACE_PORT"].to_i || 7025
|
94
|
+
testwise_socket = nil
|
93
95
|
begin
|
94
96
|
the_message = message_type + "|" + body
|
95
97
|
if @last_message == the_message then # ignore the message same as preivous one
|
96
98
|
return
|
97
99
|
end
|
98
|
-
testwise_port = ENV["TESTWISE_TRACE_PORT"].to_i || $TESTWISE_TRACE_PORT || 7025
|
99
100
|
testwise_socket = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0)
|
100
101
|
testwise_socket.connect(Socket.pack_sockaddr_in(testwise_port, '127.0.0.1'))
|
101
102
|
testwise_socket.puts(the_message)
|
102
103
|
@last_message = the_message
|
103
|
-
testwise_socket.close
|
104
104
|
rescue => e
|
105
|
+
puts "Failed to connect to TestWise on port #{testwise_port}, #{e}, #{e.backtrace}"
|
106
|
+
ensure
|
107
|
+
if testwise_socket
|
108
|
+
testwise_socket.close();
|
109
|
+
end
|
105
110
|
end
|
106
111
|
end
|
107
112
|
|
108
113
|
def check_for_pause
|
114
|
+
|
109
115
|
json_data = fetch_debug_server_status
|
110
116
|
|
111
117
|
if json_data["testwise_ready_to_pause"]
|
@@ -126,11 +132,14 @@ module RWebSpec
|
|
126
132
|
|
127
133
|
def fetch_debug_server_status
|
128
134
|
testwise_debug_server_port = ENV["TESTWISE_DEBUG_PORT"].to_i || $TESTWISE_DEBUG_PORT || 7035
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
135
|
+
if testwise_debug_server_port
|
136
|
+
puts "debug server port: #{testwise_debug_server_port}"
|
137
|
+
server = TCPSocket.open("127.0.0.1", testwise_debug_server_port)
|
138
|
+
server.puts("debug_status")
|
139
|
+
msg = server.gets.chomp
|
140
|
+
server.close
|
141
|
+
json_data = JSON.parse(msg)
|
142
|
+
end
|
134
143
|
end
|
135
144
|
|
136
145
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rwebspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.2.
|
4
|
+
version: 6.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zhimin Zhan
|
8
8
|
autorequire: rwebspec
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|