Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully test on Windows #894

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
abc3c2b
Run cucumber scenarios on Windows
mvz Apr 5, 2021
3096eea
TMP: limit set of platforms
mvz Jun 18, 2021
47764d2
Add bat runner for default test cli app
mvz Jun 30, 2019
6ad4dd6
CI: Skip scenarios with `@requires-bash` unless bash is installed.
xtrasimplicity Jun 10, 2018
44a2b6f
CI: Windows - Fixed 01\getting_started\RunCommands feature.
xtrasimplicity Jun 10, 2018
7d658f3
CI: Windows - Fixed supported_testing_frameworks.feature
xtrasimplicity Jun 10, 2018
2498edb
TMP: Split cucumber scenarios by section
mvz Nov 10, 2024
eb800ee
Use default executable instead of specifying another
mvz Jun 30, 2019
58b5d6a
Provide separate scenarios for Windows and Unix for be_a_command_foun…
mvz Jan 22, 2023
c5733d5
Make check_timeouts feature cross-platform
mvz Jul 3, 2019
780646d
Started adding unpublished windows-specific features.
xtrasimplicity Jun 10, 2018
c64b2f2
CI: Windows - Fixed CleanUpWorkingDirectory feature.
xtrasimplicity Jun 10, 2018
2d2173b
Fixed usage of .cucumberproignore file.
xtrasimplicity Jun 10, 2018
9c27183
Add @requires-sleep hook
xtrasimplicity Jun 10, 2018
11be37e
CI: Windows - Fixed 02_ConfiguringAruba\CommandRuntimeEnvironment.fea…
xtrasimplicity Jun 10, 2018
bf95659
CI: Windows - Skip Exit timeout config. Added ToDo.
xtrasimplicity Jun 10, 2018
ba39dcc
CI: Windows - Fixed 02_Configuring_Aruba\HomeDirectory feature.
xtrasimplicity Jun 10, 2018
67d3930
CI: Windows - Fixed 03\testing_frameworks\cucumber\announce_...
xtrasimplicity Jun 10, 2018
e9619ad
CI: Windows - Fixed `disabling bundler` feature.
xtrasimplicity Jun 10, 2018
be045ed
CI: Windows - Fix `define_after_hook_for_commands` feature.
xtrasimplicity Jun 10, 2018
0dd19be
CI: Windows - Fix `define_before_hook_for_commands` feature. (Cucumber)
xtrasimplicity Jun 10, 2018
af372ab
CI: Windows - Fixed `check_for_exit_status` feature (Cucumber)
xtrasimplicity Jun 10, 2018
4ee6268
Mark Windows-only version of Cleanup Working Directory feature as such
mvz Jun 19, 2021
9c918a6
Windows: Fix getting started with aruba/run commands feature
mvz Jun 19, 2021
c1158dd
Windows: Unify announce_information_for_troubleshooting feature
mvz Jun 19, 2021
9195703
Windows: Unify check_for_exit_statuses feature
mvz Jun 19, 2021
55fc43d
Make check_output_of_command feature platform independent
mvz Jun 19, 2021
b600a57
Make 02_configure_aruba/basics feature platform-independent
mvz Jun 20, 2021
4b7286e
Remove edge-case scenario
mvz Jun 20, 2021
1525fdc
Re-organize and improve output check scenarios
mvz Jun 20, 2021
74971f1
Tighten output check in Cucumber step testing RSpec success
mvz Nov 15, 2024
40199b2
WIP: Coax Arubu into rendering output
mvz Nov 15, 2024
2389e79
WIP: Tighten spec checks even more
mvz Nov 16, 2024
5c8801c
WIP
mvz Nov 16, 2024
aed5d69
TMP: Disable failing scenario temporarily
mvz Nov 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cucumberproignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/
!features/
features/04_aruba_api/command/run_simple.feature
features/unpublished
57 changes: 46 additions & 11 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ jobs:

strategy:
matrix:
ruby: ["3.1", "3.2", "jruby-9.4", "3.3"]
appraisal: [cucumber_8, cucumber_9]
include:
- ruby: "3.0"
appraisal: cucumber_8
ruby: ["3.2"]
appraisal: [cucumber_9]

env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.appraisal }}.gemfile
Expand All @@ -42,14 +39,26 @@ jobs:
bundler-cache: true
- name: Run specs
run: bundle exec rake spec
- name: Run cukes
run: bundle exec rake cucumber
- name: Run cukes (1)
run: bundle exec cucumber features/01_getting_started_with_aruba/
- name: Run cukes (2)
run: bundle exec cucumber features/02_configure_aruba/
- name: Run cukes (3)
run: bundle exec cucumber features/03_testing_frameworks/
- name: Run cukes (4)
run: bundle exec cucumber features/04_aruba_api/
- name: Run cukes (5)
run: bundle exec cucumber features/05_use_rspec_matchers/
- name: Run cukes (6)
run: bundle exec cucumber features/06_use_aruba_cli/
- name: Run cukes (8)
run: bundle exec cucumber features/08_other/

test-macos:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3"]
ruby: ["3.2"]

runs-on: macos-latest

Expand All @@ -62,14 +71,26 @@ jobs:
bundler-cache: true
- name: Run specs
run: bundle exec rake spec
- name: Run cukes
run: bundle exec rake cucumber
- name: Run cukes (1)
run: bundle exec cucumber features/01_getting_started_with_aruba/
- name: Run cukes (2)
run: bundle exec cucumber features/02_configure_aruba/
- name: Run cukes (3)
run: bundle exec cucumber features/03_testing_frameworks/
- name: Run cukes (4)
run: bundle exec cucumber features/04_aruba_api/
- name: Run cukes (5)
run: bundle exec cucumber features/05_use_rspec_matchers/
- name: Run cukes (6)
run: bundle exec cucumber features/06_use_aruba_cli/
- name: Run cukes (8)
run: bundle exec cucumber features/08_other/

test-windows:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3"]
ruby: ["3.2"]

runs-on: windows-latest

Expand All @@ -84,6 +105,20 @@ jobs:
bundler-cache: true
- name: Run specs
run: bundle exec rake spec
- name: Run cukes (1)
run: bundle exec cucumber features/01_getting_started_with_aruba/
- name: Run cukes (2)
run: bundle exec cucumber features/02_configure_aruba/
- name: Run cukes (3)
run: bundle exec cucumber features/03_testing_frameworks/
- name: Run cukes (4)
run: bundle exec cucumber features/04_aruba_api/
- name: Run cukes (5)
run: bundle exec cucumber features/05_use_rspec_matchers/
- name: Run cukes (6)
run: bundle exec cucumber features/06_use_aruba_cli/
- name: Run cukes (8)
run: bundle exec cucumber features/08_other/

checks:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Feature: Cleanup Aruba Working Directory
Background:
Given I use a fixture named "cli-app"

@unsupported-on-platform-windows
Scenario: Clean up artifacts and pwd from a previous scenario
Given a file named "features/cleanup.feature" with:
"""
Expand All @@ -30,6 +31,7 @@ Feature: Cleanup Aruba Working Directory
When I run `cucumber`
Then the features should all pass

@unsupported-on-platform-windows
Scenario: Do not clobber before run
The `@no-clobber` tag stops Aruba from clearing out its scratch directory.
Other setup steps are still performed, such as setting the current working
Expand Down
23 changes: 21 additions & 2 deletions features/01_getting_started_with_aruba/run_commands.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: Run commands with Aruba
Background:
Given I use a fixture named "getting-started-app"

@requires-bash
@requires-bash @unsupported-on-platform-windows
Scenario: Bash Program
Given an executable named "bin/aruba-test-cli" with:
"""bash
Expand Down Expand Up @@ -48,7 +48,7 @@ Feature: Run commands with Aruba
When I successfully run `cucumber`
Then the features should all pass

@requires-ruby
@requires-ruby @unsupported-on-platform-windows
Scenario: Ruby Program
Given an executable named "bin/aruba-test-cli" with:
"""ruby
Expand Down Expand Up @@ -87,3 +87,22 @@ Feature: Run commands with Aruba
"""
When I successfully run `cucumber`
Then the features should all pass

@requires-platform-windows
Scenario: Windows .bat script
Given an executable named "bin/aruba-test-cli.bat" with:
"""
echo "Hello, Aruba!"
"""
Given a file named "features/hello_aruba.feature" with:
"""
Feature: Getting Started With Aruba
Scenario: First Run of Command
Given I successfully run `aruba-test-cli`
Then the output should contain:
\"\"\"
Hello, Aruba!
\"\"\"
"""
When I successfully run `cucumber`
Then the features should all pass
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Feature: Supported Testing Frameworks
"""
$LOAD_PATH.unshift File.expand_path('../test', __FILE__)

require 'test_helper'
require_relative 'test_helper'
require 'minitest/autorun'

class FirstRun < Minitest::Test
Expand All @@ -86,3 +86,4 @@ Feature: Supported Testing Frameworks
"""
When I run `ruby -Ilib:test test/use_aruba_with_minitest.rb`
Then the tests should all pass

17 changes: 9 additions & 8 deletions features/02_configure_aruba/basics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ Feature: Usage of configuration
Background:
Given I use a fixture named "cli-app"
And an executable named "bin/aruba-test-cli" with:
"""bash
#!/bin/bash
trap "exit 128" SIGTERM SIGINT
sleep $*
"""ruby
#!/usr/bin/env ruby
sleep ARGV[0].to_f
"""

# TMP: Disable temporarily
@unsupported-on-platform-windows
Scenario: Setting default values for option for RSpec
Given a file named "spec/support/aruba_config.rb" with:
"""ruby
Expand Down Expand Up @@ -108,7 +109,7 @@ Feature: Usage of configuration

Scenario: Slow command
When I run `aruba-test-cli 1.0`
Then the exit status should be 128
Then the exit status should not be 0
"""
When I run `cucumber`
Then the features should all pass
Expand All @@ -122,7 +123,7 @@ Feature: Usage of configuration
Given a file named "features/support/aruba_config.rb" with:
"""ruby
Aruba.configure do |config|
config.exit_timeout = 0.2
config.exit_timeout = 0.5
end
"""
And a file named "features/support/hooks.rb" with:
Expand All @@ -144,8 +145,8 @@ Feature: Usage of configuration
Then the exit status should be 0

Scenario: Slow command which might be a failure
When I run `aruba-test-cli 0.5`
Then the exit status should be 128
When I run `aruba-test-cli 1`
Then the exit status should not be 0
"""
When I run `cucumber`
Then the features should all pass
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@requires-env @unsupported-on-platform-windows
Feature: Define default process environment
Say you want to have a default set of environment variables, then use this
code.
Expand Down
1 change: 1 addition & 0 deletions features/02_configure_aruba/exit_timeout.feature
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@unsupported-on-platform-windows @todo-improve-cross-platform-support
Feature: Configure timeout for command execution

As a developer
Expand Down
4 changes: 2 additions & 2 deletions features/02_configure_aruba/home_directory.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Feature: Configure the home directory to be used with aruba
When I successfully run `cucumber`
Then the output should match:
"""
The default value is "/.*/tmp/aruba"
The default value is ".*/tmp/aruba"
"""

Scenario: Set to current working directory
Expand Down Expand Up @@ -60,7 +60,7 @@ Feature: Configure the home directory to be used with aruba
Then I successfully run `cucumber`
Then the output should match:
"""
The value is "/.*/tmp/aruba/home"
The value is ".*/tmp/aruba/home"
"""

Scenario: Set to some other path (deprecated)
Expand Down
Loading
Loading