ruby_raider 0.8.5 → 0.8.6
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/.github/workflows/integration.yml +25 -0
- data/.github/workflows/{rspec.yml → system.yml} +9 -7
- data/README.md +5 -21
- data/Rakefile +19 -0
- data/lib/generators/templates/common/read_me.tt +16 -25
- data/ruby_raider.gemspec +1 -1
- data/spec/{open_ai_commands_spec.rb → integration/commands/open_ai_commands_spec.rb} +4 -4
- data/spec/{scaffolding_commands_spec.rb → integration/commands/scaffolding_commands_spec.rb} +4 -4
- data/spec/{utility_commands_spec.rb → integration/commands/utility_commands_spec.rb} +4 -4
- data/spec/{actions_generator_spec.rb → integration/generators/actions_generator_spec.rb} +2 -2
- data/spec/{automation_generator_spec.rb → integration/generators/automation_generator_spec.rb} +2 -2
- data/spec/{common_generator_spec.rb → integration/generators/common_generator_spec.rb} +2 -2
- data/spec/{cucumber_generator_spec.rb → integration/generators/cucumber_generator_spec.rb} +2 -2
- data/spec/{helpers_generator_spec.rb → integration/generators/helpers_generator_spec.rb} +2 -2
- data/spec/{rspec_generator_spec.rb → integration/generators/rspec_generator_spec.rb} +2 -2
- data/spec/{ruby_raider_spec.rb → system/ruby_raider_spec.rb} +6 -6
- metadata +14 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bd92fae06515596d875be2a1c9d05b2335574839da3269de1c598d4287e9fd9
|
4
|
+
data.tar.gz: 8cc4c5922b36406b33d5e5df4c897ab0ce3a0d3a7036395293e634eeccbb27a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c521e8d445f0490f04349ede87a4fd56552dd13ac1261735792b82a5ab3c064202120fc1bd4fb64c18d05f7575d5dd5b94dde68d186c3cb7b27e54ceeb095390
|
7
|
+
data.tar.gz: 2d4f842b0214f55d11a6711353dd059d21085ee636cd1d6c81bd2d143b2fcee92d236f27906f1a8caa3bbc9b44dcb9a6151c2dd29f7720228a873480f9922742
|
@@ -0,0 +1,25 @@
|
|
1
|
+
name: Integration tests
|
2
|
+
|
3
|
+
on: [pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
name: Integration pipeline
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
|
10
|
+
steps:
|
11
|
+
- name: Set up Ruby
|
12
|
+
uses: ruby/setup-ruby@f20f1eae726df008313d2e0d78c5e602562a1bcf
|
13
|
+
with:
|
14
|
+
ruby-version: head
|
15
|
+
|
16
|
+
- name: Checkout repository
|
17
|
+
uses: actions/checkout@v3
|
18
|
+
|
19
|
+
- name: Install gems
|
20
|
+
run: bundle install
|
21
|
+
|
22
|
+
- name: Build and run integration tests
|
23
|
+
env:
|
24
|
+
OPENAI_ACCESS_TOKEN: ${{ secrets.OPENAI_ACCESS_TOKEN }}
|
25
|
+
run: rake integration
|
@@ -1,14 +1,16 @@
|
|
1
|
-
|
1
|
+
env:
|
2
|
+
NAME: 'CI'
|
3
|
+
|
4
|
+
name: System tests
|
2
5
|
|
3
6
|
on:
|
4
7
|
push:
|
5
|
-
branches:
|
6
|
-
|
7
|
-
branches: [ "*" ]
|
8
|
+
branches:
|
9
|
+
- master
|
8
10
|
|
9
11
|
jobs:
|
10
12
|
build:
|
11
|
-
name:
|
13
|
+
name: System pipeline
|
12
14
|
runs-on: ubuntu-latest
|
13
15
|
|
14
16
|
steps:
|
@@ -23,7 +25,7 @@ jobs:
|
|
23
25
|
- name: Install gems
|
24
26
|
run: bundle install
|
25
27
|
|
26
|
-
- name: Build and
|
28
|
+
- name: Build and run system tests
|
27
29
|
env:
|
28
30
|
OPENAI_ACCESS_TOKEN: ${{ secrets.OPENAI_ACCESS_TOKEN }}
|
29
|
-
run:
|
31
|
+
run: rake system
|
data/README.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
# Ruby Raider
|
2
2
|
|
3
3
|
[](https://badge.fury.io/rb/ruby_raider)
|
4
|
-
[](https://github.com/RubyRaider/ruby_raider/actions/workflows/integration.yml)
|
5
|
+
[](https://github.com/RubyRaider/ruby_raider/actions/workflows/reek.yml)
|
6
|
+
[](https://github.com/RubyRaider/ruby_raider/actions/workflows/rubocop.yml)
|
5
7
|
[](https://gitter.im/RubyRaider/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
6
8
|
|
7
9
|
<!-- PROJECT LOGO -->
|
@@ -90,7 +92,8 @@ Commands:
|
|
90
92
|
raider help [COMMAND] # Describe available commands or one specific command
|
91
93
|
raider new [PROJECT_NAME] # Creates a new framework based on settings picked
|
92
94
|
raider open_ai # Provides access to all the open ai commands
|
93
|
-
raider utility # Provides access to all the utility commands
|
95
|
+
raider utility # Provides access to all the utility commands
|
96
|
+
raider version # It shows the version of Ruby Raider you are currently using
|
94
97
|
```
|
95
98
|
|
96
99
|
All the basic commands have their corresponding shortcut:
|
@@ -101,25 +104,6 @@ All the basic commands have their corresponding shortcut:
|
|
101
104
|
* u for utility
|
102
105
|
* v for version
|
103
106
|
|
104
|
-
Ruby raider also supports scaffolding:
|
105
|
-
|
106
|
-
* To create a new page object you do: ```raider g page [PAGE_NAME]```
|
107
|
-
* To create a new spec you do: ```raider g spec [SPEC_NAME]```
|
108
|
-
* To create a new feature you do: ```raider g feature [FEATURE_NAME]```
|
109
|
-
|
110
|
-
It's possible to add the option --path or -p if you want to specify where to create your features, pages, helpers and
|
111
|
-
specs.
|
112
|
-
|
113
|
-
If you want to set the default path for the creation of your features, helpers and specs:
|
114
|
-
|
115
|
-
```ruby
|
116
|
-
raider u path [PATH_NAME] - -feature or -f
|
117
|
-
raider u path [PATH_NAME] - -spec or -s
|
118
|
-
raider u path [PATH_NAME] - -helper or -h
|
119
|
-
```
|
120
|
-
|
121
|
-
If you don't specify an option, path will assume you want to change the default path for pages.
|
122
|
-
|
123
107
|
### Appium Server Command
|
124
108
|
To initialise Appium server run this command:
|
125
109
|
```ruby
|
data/Rakefile
CHANGED
@@ -33,3 +33,22 @@ desc 'Logs a warning'
|
|
33
33
|
task :log, [:message] do |_t, args|
|
34
34
|
RubyRaider::Logger.warn(args.message)
|
35
35
|
end
|
36
|
+
|
37
|
+
desc 'Runs integration tests'
|
38
|
+
task :integration, [:type, :name] do |_t, args|
|
39
|
+
path = args.type ? "spec/integration/#{args.type}" : 'spec/integration'
|
40
|
+
full_path = if args.type == 'generators' && args.name
|
41
|
+
"#{path}/#{args.name.downcase}_generator_spec.rb"
|
42
|
+
elsif args.type == 'commands' && args.name
|
43
|
+
"#{path}/#{args.name.downcase}_commands_spec.rb"
|
44
|
+
else
|
45
|
+
path
|
46
|
+
end
|
47
|
+
|
48
|
+
system "rspec #{full_path}"
|
49
|
+
end
|
50
|
+
|
51
|
+
desc 'Runs system tests'
|
52
|
+
task :system do |_t|
|
53
|
+
system 'rspec spec/system'
|
54
|
+
end
|
@@ -39,14 +39,17 @@ Ruby Raider is a generator and scaffolding gem to make UI test automation easier
|
|
39
39
|
| Rspec and Watir | | Rspec and Appium for Android |
|
40
40
|
| | | Cucumber and Appium Cross-platform |
|
41
41
|
| | | Rspec and Appium Cross-platform |
|
42
|
-
| | |
|
42
|
+
| | | Cucumber and Sparkling Watir for IOS |
|
43
43
|
| | | Rspec and Sparkling Watir for IOS |
|
44
44
|
|
45
45
|
|
46
46
|
|
47
47
|
***In order to run the Appium tests, download the example [app](https://github.com/saucelabs/my-demo-app-rn).***
|
48
|
-
***Remember to use the full path of the app that you download in the capabilities file
|
49
|
-
|
48
|
+
***Remember to use the full path of the app that you download in the capabilities file and start the server using one of the commands below:***
|
49
|
+
```ruby
|
50
|
+
raider u start_appium
|
51
|
+
appium --base-path /wd/hub
|
52
|
+
```
|
50
53
|
***In order to run the visual tests with applitools, you need to create an account and get your api key, you can read
|
51
54
|
more [here](https://applitools.com/docs/topics/overview/obtain-api-key.html#:~:text=If%20you%20already%20have%20an,Your%20key%20will%20be%20displayed.)
|
52
55
|
.***
|
@@ -82,13 +85,13 @@ Select the ones you will like to work with.
|
|
82
85
|
###### Anything between square brackets([...]) is where your imput goes
|
83
86
|
|
84
87
|
```ruby
|
85
|
-
Commands
|
86
|
-
|
87
|
-
raider help [COMMAND] # Describe available commands or one specific command
|
88
|
-
raider new [PROJECT_NAME] # Creates a new framework based on settings picked
|
89
|
-
raider open_ai # Provides access to all the open ai commands
|
90
|
-
raider utility # Provides access to all the utility commands
|
91
|
-
raider version # It shows the version of Ruby Raider you are currently using
|
88
|
+
Commands:
|
89
|
+
raider generate # Provides access to all the generators commands
|
90
|
+
raider help [COMMAND] # Describe available commands or one specific command
|
91
|
+
raider new [PROJECT_NAME] # Creates a new framework based on settings picked
|
92
|
+
raider open_ai # Provides access to all the open ai commands
|
93
|
+
raider utility # Provides access to all the utility commands
|
94
|
+
raider version # It shows the version of Ruby Raider you are currently using
|
92
95
|
```
|
93
96
|
|
94
97
|
All the basic commands have their corresponding shortcut:
|
@@ -99,25 +102,13 @@ All the basic commands have their corresponding shortcut:
|
|
99
102
|
* u for utility
|
100
103
|
* v for version
|
101
104
|
|
102
|
-
Ruby raider also supports scaffolding:
|
103
|
-
|
104
|
-
* To create a new page object you do: ```raider g page [PAGE_NAME]```
|
105
|
-
* To create a new spec you do: ```raider g spec [SPEC_NAME]```
|
106
|
-
* To create a new feature you do: ```raider g feature [FEATURE_NAME]```
|
107
|
-
|
108
|
-
It's possible to add the option --path or -p if you want to specify where to create your features, pages, helpers and
|
109
|
-
specs.
|
110
|
-
|
111
|
-
If you want to set the default path for the creation of your features, helpers and specs:
|
112
105
|
|
106
|
+
### Appium Server Command
|
107
|
+
To initialise Appium server run this command:
|
113
108
|
```ruby
|
114
|
-
raider u
|
115
|
-
raider u path [PATH_NAME] - -spec or -s
|
116
|
-
raider u path [PATH_NAME] - -helper or -h
|
109
|
+
raider u start_appium
|
117
110
|
```
|
118
111
|
|
119
|
-
If you don't specify an option, path will assume you want to change the default path for pages.
|
120
|
-
|
121
112
|
### Open AI Commands
|
122
113
|
|
123
114
|
```ruby
|
data/ruby_raider.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'ruby_raider'
|
5
|
-
s.version = '0.8.
|
5
|
+
s.version = '0.8.6'
|
6
6
|
s.summary = 'A gem to make setup and start of UI automation projects easier'
|
7
7
|
s.description = 'This gem has everything you need to start working with test automation'
|
8
8
|
s.authors = ['Agustin Pequeno']
|
@@ -2,10 +2,10 @@
|
|
2
2
|
# require 'fileutils'
|
3
3
|
# require 'pathname'
|
4
4
|
# require 'yaml'
|
5
|
-
# require_relative '
|
6
|
-
# require_relative '
|
7
|
-
# require_relative '
|
8
|
-
# require_relative 'spec_helper'
|
5
|
+
# require_relative '../../../lib/generators/common_generator'
|
6
|
+
# require_relative '../../../lib/integration.commands/open_ai_commands'
|
7
|
+
# require_relative '../../../lib/scaffolding/scaffolding'
|
8
|
+
# require_relative '../../spec_helper'
|
9
9
|
#
|
10
10
|
# describe OpenAiCommands do
|
11
11
|
# let(:open_ai) { described_class }
|
data/spec/{scaffolding_commands_spec.rb → integration/commands/scaffolding_commands_spec.rb}
RENAMED
@@ -1,10 +1,10 @@
|
|
1
1
|
require 'dotenv'
|
2
2
|
require 'pathname'
|
3
3
|
require 'yaml'
|
4
|
-
require_relative '
|
5
|
-
require_relative '
|
6
|
-
require_relative '
|
7
|
-
require_relative 'spec_helper'
|
4
|
+
require_relative '../../../lib/generators/common_generator'
|
5
|
+
require_relative '../../../lib/commands/scaffolding_commands'
|
6
|
+
require_relative '../../../lib/scaffolding/scaffolding'
|
7
|
+
require_relative '../../spec_helper'
|
8
8
|
|
9
9
|
describe ScaffoldingCommands do
|
10
10
|
let(:scaffold) { described_class }
|
@@ -2,10 +2,10 @@ require 'dotenv'
|
|
2
2
|
require 'fileutils'
|
3
3
|
require 'pathname'
|
4
4
|
require 'yaml'
|
5
|
-
require_relative '
|
6
|
-
require_relative '
|
7
|
-
require_relative '
|
8
|
-
require_relative 'spec_helper'
|
5
|
+
require_relative '../../../lib/generators/common_generator'
|
6
|
+
require_relative '../../../lib/commands/utility_commands'
|
7
|
+
require_relative '../../../lib/scaffolding/scaffolding'
|
8
|
+
require_relative '../../spec_helper'
|
9
9
|
|
10
10
|
describe UtilityCommands do
|
11
11
|
let(:utility) { described_class }
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative '
|
4
|
-
require_relative 'spec_helper'
|
3
|
+
require_relative '../../../lib/generators/actions/actions_generator'
|
4
|
+
require_relative '../../spec_helper'
|
5
5
|
|
6
6
|
describe ActionsGenerator do
|
7
7
|
shared_examples 'creates web automation framework' do |name|
|
data/spec/{automation_generator_spec.rb → integration/generators/automation_generator_spec.rb}
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative '
|
4
|
-
require_relative 'spec_helper'
|
3
|
+
require_relative '../../../lib/generators/automation/automation_generator'
|
4
|
+
require_relative '../../spec_helper'
|
5
5
|
|
6
6
|
describe AutomationGenerator do
|
7
7
|
shared_examples 'creates web automation framework' do |name|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative '
|
4
|
-
require_relative 'spec_helper'
|
3
|
+
require_relative '../../../lib/generators/common_generator'
|
4
|
+
require_relative '../../spec_helper'
|
5
5
|
|
6
6
|
describe CommonGenerator do
|
7
7
|
shared_examples 'creates common files' do |name|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative '
|
4
|
-
require_relative 'spec_helper'
|
3
|
+
require_relative '../../../lib/generators/cucumber/cucumber_generator'
|
4
|
+
require_relative '../../spec_helper'
|
5
5
|
|
6
6
|
describe CucumberGenerator do
|
7
7
|
shared_examples 'creates cucumber files' do |project_name, file_name|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative '
|
4
|
-
require_relative 'spec_helper'
|
3
|
+
require_relative '../../../lib/generators/helper_generator'
|
4
|
+
require_relative '../../spec_helper'
|
5
5
|
|
6
6
|
describe HelpersGenerator do
|
7
7
|
shared_examples 'creates common helpers' do |name|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative '
|
4
|
-
require_relative 'spec_helper'
|
3
|
+
require_relative '../../../lib/generators/rspec/rspec_generator'
|
4
|
+
require_relative '../../spec_helper'
|
5
5
|
|
6
6
|
describe RspecGenerator do
|
7
7
|
shared_examples 'creates factory files' do |project_name|
|
@@ -1,14 +1,14 @@
|
|
1
1
|
require 'fileutils'
|
2
|
-
require_relative 'spec_helper'
|
3
|
-
require_relative '
|
2
|
+
require_relative '../spec_helper'
|
3
|
+
require_relative '../../lib/ruby_raider'
|
4
4
|
|
5
5
|
describe RubyRaider do
|
6
6
|
shared_examples 'execute web frameworks' do |name|
|
7
7
|
it 'runs the tests' do
|
8
|
-
|
9
|
-
Dir.chdir(name)
|
10
|
-
|
11
|
-
|
8
|
+
if ENV['CI']
|
9
|
+
Dir.chdir(name) { system('gem install bundler && bundle install && raider u raid') }
|
10
|
+
else
|
11
|
+
Bundler.with_unbundled_env { Dir.chdir(name) { system('bundle exec raider u raid') } }
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_raider
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Agustin Pequeno
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|
@@ -175,9 +175,10 @@ files:
|
|
175
175
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
176
176
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
177
177
|
- ".github/auto_assign-issues.yml"
|
178
|
+
- ".github/workflows/integration.yml"
|
178
179
|
- ".github/workflows/reek.yml"
|
179
|
-
- ".github/workflows/rspec.yml"
|
180
180
|
- ".github/workflows/rubocop.yml"
|
181
|
+
- ".github/workflows/system.yml"
|
181
182
|
- ".gitignore"
|
182
183
|
- ".reek.yml"
|
183
184
|
- ".rubocop.yml"
|
@@ -271,18 +272,18 @@ files:
|
|
271
272
|
- lib/utilities/logger.rb
|
272
273
|
- lib/utilities/utilities.rb
|
273
274
|
- ruby_raider.gemspec
|
274
|
-
- spec/
|
275
|
-
- spec/
|
276
|
-
- spec/
|
277
|
-
- spec/
|
278
|
-
- spec/
|
279
|
-
- spec/
|
280
|
-
- spec/
|
281
|
-
- spec/
|
282
|
-
- spec/
|
275
|
+
- spec/integration/commands/open_ai_commands_spec.rb
|
276
|
+
- spec/integration/commands/scaffolding_commands_spec.rb
|
277
|
+
- spec/integration/commands/utility_commands_spec.rb
|
278
|
+
- spec/integration/generators/actions_generator_spec.rb
|
279
|
+
- spec/integration/generators/automation_generator_spec.rb
|
280
|
+
- spec/integration/generators/common_generator_spec.rb
|
281
|
+
- spec/integration/generators/cucumber_generator_spec.rb
|
282
|
+
- spec/integration/generators/helpers_generator_spec.rb
|
283
|
+
- spec/integration/generators/rspec_generator_spec.rb
|
283
284
|
- spec/spec_helper.rb
|
284
285
|
- spec/support/settings_helper.rb
|
285
|
-
- spec/
|
286
|
+
- spec/system/ruby_raider_spec.rb
|
286
287
|
homepage: https://github.com/RubyRaider/ruby_raider
|
287
288
|
licenses:
|
288
289
|
- MIT
|