awetestlib 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +8 -2
- data/bin/awetestlib +3 -0
- data/bin/awetestlib-cucumber-setup.rb +22 -0
- data/bin/awetestlib-helpers.rb +2 -2
- data/bin/awetestlib-netbeans-setup.rb +1 -0
- data/bin/awetestlib-rubymine-setup.rb +1 -1
- data/lib/awetestlib/html_report.rb +2 -2
- data/lib/awetestlib/regression/runner.rb +1 -1
- data/lib/version.rb +2 -2
- data/setup_samples/sample_netbeans/nbproject/private/configs/Demo.properties +1 -0
- metadata +8 -5
data/README.md
CHANGED
@@ -10,10 +10,10 @@ After completing this guide you will be able to run tests locally from command l
|
|
10
10
|
### Prerequisites
|
11
11
|
|
12
12
|
You need to have Ruby 1.8.7 installed. You can download Ruby 1.8.7
|
13
|
-
[here](http://
|
13
|
+
[here](http://rubyinstaller.org/downloads/)
|
14
14
|
|
15
15
|
Additionally, you will need to install DevKit to compile a few dependent gems. You can download DevKit
|
16
|
-
[here](http://
|
16
|
+
[here](http://rubyinstaller.org/downloads/)
|
17
17
|
|
18
18
|
### Install
|
19
19
|
|
@@ -37,6 +37,12 @@ Additionally, you will need to install DevKit to compile a few dependent gems. Y
|
|
37
37
|
|
38
38
|
You can now start your scripts within the IDE. Use the Run Configuration button.
|
39
39
|
|
40
|
+
For additional information on IDE setup, refer to the links below:
|
41
|
+
|
42
|
+
- [Netbeans IDE setup](someurl)
|
43
|
+
|
44
|
+
- [Rubymine IDE setup](anotherurl)
|
45
|
+
|
40
46
|
3. If you prefer to run your tests from command line, you can use the following command
|
41
47
|
- `awetestlib <script_file> [parameters]`
|
42
48
|
|
data/bin/awetestlib
CHANGED
@@ -16,6 +16,9 @@ elsif cmd == "rubymine_setup"
|
|
16
16
|
elsif cmd == "netbeans_setup"
|
17
17
|
require File.join(File.dirname(__FILE__),"awetestlib-netbeans-setup")
|
18
18
|
awetestlib_netbeans_setup
|
19
|
+
elsif cmd == 'cucumber_setup'
|
20
|
+
require File.join(File.dirname(__FILE__),"awetestlib-cucumber-setup")
|
21
|
+
awetestlib_cucumber_setup
|
19
22
|
else
|
20
23
|
|
21
24
|
require 'optparse'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
def awetestlib_cucumber_setup
|
2
|
+
@cucumber_dir = File.join(FileUtils.pwd, "sample_cucumber")
|
3
|
+
@source_dir = File.join(File.dirname(__FILE__), '..', 'setup_samples', 'sample_cucumber')
|
4
|
+
|
5
|
+
if File.exists?(@cucumber_dir)
|
6
|
+
puts "Sample Cucumber features directory already exists."
|
7
|
+
exit 1
|
8
|
+
end
|
9
|
+
|
10
|
+
msg("Question") do
|
11
|
+
puts "I'm about to create a sample cucumber feature in this directory"
|
12
|
+
puts "Please hit return to confirm that's what you want."
|
13
|
+
puts "NOTE: You may need to run this command as an administrator."
|
14
|
+
end
|
15
|
+
exit 2 unless STDIN.gets.chomp == ''
|
16
|
+
FileUtils.cp_r(@source_dir, @cucumber_dir)
|
17
|
+
msg("Info") do
|
18
|
+
puts "Configuring files and settings"
|
19
|
+
puts "From the sample_cucumber/features folder, you may now run the following command: cucumber yahoo_mail.feature"
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
data/bin/awetestlib-helpers.rb
CHANGED
@@ -10,7 +10,7 @@ def print_usage
|
|
10
10
|
Usage Options:
|
11
11
|
|
12
12
|
awetestlib regression_setup
|
13
|
-
setup awetest regression and
|
13
|
+
setup awetest regression and register autoitx3.dll
|
14
14
|
|
15
15
|
awetestlib rubymine_setup
|
16
16
|
setup a sample rubymine project
|
@@ -19,7 +19,7 @@ def print_usage
|
|
19
19
|
setup a sample netbeans project
|
20
20
|
|
21
21
|
awetestlib cucumber_setup
|
22
|
-
setup cucumber regression and
|
22
|
+
setup cucumber regression and provide skeleton folder structure
|
23
23
|
|
24
24
|
awetestlib <script_file> [parameters]
|
25
25
|
run an awetest regression script
|
@@ -3,6 +3,7 @@ def edit_config_file
|
|
3
3
|
@demo_script = File.join(FileUtils.pwd,"sample_netbeans", "demo.rb")
|
4
4
|
workspace_text = File.read(@new_config_file)
|
5
5
|
new_workspace_text = workspace_text.gsub(/SAMPLE-SCRIPT/,@demo_script )
|
6
|
+
new_workspace_text = new_workspace_text.gsub(/WORK-DIR/, File.dirname(@demo_script))
|
6
7
|
File.open(@new_config_file, "w") {|file| file.puts new_workspace_text}
|
7
8
|
end
|
8
9
|
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
def edit_config_file
|
3
2
|
@new_config_file = File.join(FileUtils.pwd,"sample_rubymine",".idea","workspace.xml")
|
4
3
|
@demo_script = File.join(FileUtils.pwd,"sample_rubymine", "demo.rb")
|
@@ -6,6 +5,7 @@ def edit_config_file
|
|
6
5
|
workspace_text = File.read(@new_config_file)
|
7
6
|
new_workspace_text = workspace_text.gsub(/SAMPLE-SCRIPT/,@demo_script )
|
8
7
|
new_workspace_text = new_workspace_text.gsub(/RUBY-SCRIPT/, @awetestlib_file)
|
8
|
+
new_workspace_text = new_workspace_text.gsub(/WORK-DIR/, File.dirname(@demo_script))
|
9
9
|
File.open(@new_config_file, "w") {|file| file.puts new_workspace_text}
|
10
10
|
end
|
11
11
|
|
@@ -52,7 +52,7 @@ module Awetestlib
|
|
52
52
|
end
|
53
53
|
|
54
54
|
# Create the report name
|
55
|
-
strTime = '_' +
|
55
|
+
strTime = '_' + strMonth + strDay + strYear + '_' + strHour + strMinutes + strSeconds + '.html'
|
56
56
|
strNiceTime = strDay + '-' + strMonth + '-' + strYear + ' @ ' + strHour + ':' + strMinutes + ':' + strSeconds
|
57
57
|
strTotalReport = reportName + strTime
|
58
58
|
|
@@ -94,7 +94,7 @@ module Awetestlib
|
|
94
94
|
<tbody>
|
95
95
|
<tr>
|
96
96
|
<td style=width: 150px;> </td>
|
97
|
-
<td align=left><img src="
|
97
|
+
<td align=left><img src="https://raw.github.com/3qilabs/awetestlib/develop/images/logo.png"></img></td>
|
98
98
|
<td align=right><p class=title>Test Report</p></td>
|
99
99
|
</tr>
|
100
100
|
</tbody>
|
@@ -283,7 +283,7 @@ module Awetestlib
|
|
283
283
|
end
|
284
284
|
|
285
285
|
def initiate_html_report
|
286
|
-
@html_report_name = File.join(
|
286
|
+
@html_report_name = File.join(FileUtils.pwd, 'awetest_reports', @myName)
|
287
287
|
@html_report_dir = File.dirname(@html_report_name)
|
288
288
|
FileUtils.mkdir @html_report_dir unless File.directory? @html_report_dir
|
289
289
|
@report_class = Awetestlib::HtmlReport.new(@myName)
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awetestlib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 8
|
10
|
+
version: 0.1.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Anthony Woo
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-08-
|
19
|
+
date: 2012-08-28 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: watir-webdriver
|
@@ -203,6 +203,7 @@ email: patrick@3qilabs.com
|
|
203
203
|
executables:
|
204
204
|
- AutoItX3.dll
|
205
205
|
- awetestlib
|
206
|
+
- awetestlib-cucumber-setup.rb
|
206
207
|
- awetestlib-helpers.rb
|
207
208
|
- awetestlib-netbeans-setup.rb
|
208
209
|
- awetestlib-regression-setup.rb
|
@@ -222,6 +223,7 @@ files:
|
|
222
223
|
- awetestlib_osx.gemspec
|
223
224
|
- bin/AutoItX3.dll
|
224
225
|
- bin/awetestlib
|
226
|
+
- bin/awetestlib-cucumber-setup.rb
|
225
227
|
- bin/awetestlib-helpers.rb
|
226
228
|
- bin/awetestlib-netbeans-setup.rb
|
227
229
|
- bin/awetestlib-regression-setup.rb
|
@@ -303,9 +305,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
303
305
|
requirements: []
|
304
306
|
|
305
307
|
rubyforge_project:
|
306
|
-
rubygems_version: 1.8.
|
308
|
+
rubygems_version: 1.8.17
|
307
309
|
signing_key:
|
308
310
|
specification_version: 3
|
309
311
|
summary: Awetest DSL for automated testing of browser-based applications.
|
310
312
|
test_files: []
|
311
313
|
|
314
|
+
has_rdoc:
|