cucumber_test_complete 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/cucumber_test_complete.rb +25 -23
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTBmMGY4NjE3OWI4NGM5YWRmM2E4NmYxZmU1Yzc4OGU1ZDY1ZjY5ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YThkN2RlN2VjOTA0ZjYyNGZjMGFlNTQyZjc2YjUzMjZkODQ3Y2IxNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2YyZWExNmIyMDc4MWM1NGU3ZTc4ZjQ5NjA3NDQ0ZGQ1MjRkNmJmYzQwYWYy
|
10
|
+
ZDA5NjhhZmY1NmQ5OWRkZjZmZmYwNzQ1ODM5MzliYzNkYTc5ZTQ5ZmQ2Y2I3
|
11
|
+
YmExNzk5YzVjNWMyOTI1OWNiOWNjOWIyNTdhNGQ5MzVlNzA3MzA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDQzNGNmNWZmNGIyNTlkODY4MGRlMGZmNzk3NWRhZDY4MWNiMzBjNWZjNjg5
|
14
|
+
MTk3MTA0YmViY2NiYzAzMzU5YWVhM2M4Y2NjNGJmYTBjZWRlY2FhMTMwZDkz
|
15
|
+
YmIyZTAwZDViMGQxODRiYmY0NmFjNTcxMDMxNDIzYjRhMDYwOTA=
|
@@ -2,35 +2,37 @@ require 'win32ole'
|
|
2
2
|
require 'rspec-expectations'
|
3
3
|
|
4
4
|
class TestCompleteWorld
|
5
|
-
def initialize(test_complete_path, project_name, script_unit)
|
6
|
-
@project_name = project_name
|
7
|
-
@script_unit = script_unit
|
8
|
-
|
9
|
-
puts 'Connecting to TestComplete'
|
10
|
-
@test_complete = WIN32OLE.connect('TestComplete.TestCompleteApplication')
|
11
5
|
|
6
|
+
def initialize(test_complete_path, project_name)
|
7
|
+
@project_name = project_name
|
8
|
+
|
9
|
+
application_to_use = 'TestComplete.TestCompleteApplication'
|
10
|
+
|
12
11
|
begin
|
13
|
-
|
12
|
+
puts 'Connecting to TestExecute'
|
13
|
+
@test_execute = WIN32OLE.connect(application_to_use)
|
14
|
+
@test_execute.Integration
|
14
15
|
rescue
|
15
|
-
puts '
|
16
|
-
@
|
16
|
+
puts 'TestExecute does not appear to be running - starting instead'
|
17
|
+
Thread.new {@test_execute = WIN32OLE.new(application_to_use)}
|
17
18
|
end
|
18
|
-
|
19
|
-
|
19
|
+
|
20
|
+
# dumb windows thing
|
21
|
+
test_complete_path = test_complete_path.gsub!('/', '\\')
|
20
22
|
|
21
23
|
puts "Connected to TestComplete - making visible and opening project #{test_complete_path}"
|
22
24
|
|
23
|
-
@
|
24
|
-
@
|
25
|
+
@test_execute.Visible = true # works only with testcomplete
|
26
|
+
@test_execute.Integration.OpenProjectSuite(test_complete_path)
|
25
27
|
|
26
|
-
@integration = @
|
28
|
+
@integration = @test_execute.Integration
|
27
29
|
end
|
28
30
|
|
29
|
-
def run_routine(name)
|
30
|
-
puts "Running #{name} in project #{project_name}"
|
31
|
+
def run_routine(name,script_unit)
|
32
|
+
puts "Running #{name} in project #{@project_name}"
|
31
33
|
begin
|
32
34
|
run_with_delays do
|
33
|
-
@integration.RunRoutine(@project_name,
|
35
|
+
@integration.RunRoutine(@project_name, script_unit, name)
|
34
36
|
end
|
35
37
|
rescue
|
36
38
|
raise "Call to #{name} failed"
|
@@ -48,25 +50,25 @@ class TestCompleteWorld
|
|
48
50
|
sleep 0.1
|
49
51
|
end
|
50
52
|
|
51
|
-
@
|
53
|
+
@test_execute.Integration.GetLastResultDescription.Status.should_not eq 2
|
52
54
|
end
|
53
55
|
|
54
|
-
def run_routine_ex(name,
|
56
|
+
def run_routine_ex(name, script_unit, args=[])
|
55
57
|
puts "Running #{name} with arguments #{args} in project #{@project_name}"
|
56
58
|
begin
|
57
59
|
run_with_delays do
|
58
|
-
@integration.RunRoutineEx(@project_name,
|
60
|
+
@integration.RunRoutineEx(@project_name, script_unit, name, args)
|
59
61
|
end
|
60
62
|
rescue
|
61
63
|
raise "Call to #{name} with arguments #{args} failed"
|
62
64
|
end
|
63
65
|
end
|
64
66
|
|
65
|
-
def call_script(name, *args)
|
67
|
+
def call_script(name, script_unit, *args)
|
66
68
|
unless args.empty?
|
67
|
-
run_routine_ex(name, args)
|
69
|
+
run_routine_ex(name,script_unit, args)
|
68
70
|
else
|
69
|
-
run_routine(name)
|
71
|
+
run_routine(name,script_unit)
|
70
72
|
end
|
71
73
|
end
|
72
74
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber_test_complete
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Holland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A gem for integrating TestComplete into your Cucumber World
|
14
14
|
email: NathanH@granicus.com
|