To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorRun commands with Aruba
As long as you've got the neccessary programs, libraries, runtime
environments, interpreters installed, it doesn't matter in which programming
language your commandline application is implemented. You can even use POSIX
standard tools like "printf".
Below you find some examples of the "Hello, Aruba!"-application implemented
with different programming languages and a single example for a POSIX
standard tool. This is NOT an exclusive list. Every commandline application
should run with aruba
.
- Background
-
- Given
- I use a fixture named "getting-started-app"
- And
-
a file named "features/hello_aruba.feature" with:
Feature: Getting Started With Aruba Scenario: First Run of Command Given I successfully run
cli
Then the output should contain: """ Hello, Aruba! """
- Scenarios
-
- Bash Program
- Bash Program run via bash
- Ruby Program
- Ruby Program via "ruby"
- Python Program
- Python Program via "python"
- Perl Program
- Perl Program via "perl"
- Java Program
- POSIX standard tools
- Bash Program
-
- Given
-
an executable named "bin/aruba-test-cli" with:
#!/usr/bin/env bash echo "Hello, Aruba!"
- When
-
I successfully run
cucumber
- Then
- the features should all pass
- Bash Program run via bash
-
- Given
-
a file named "features/hello_aruba.feature" with:
Feature: Getting Started With Aruba Scenario: First Run of Command Given a file named "cli.sh" with: """ echo "Hello, Aruba!" """ When I successfully run
bash ./cli.sh
Then the output should contain: """ Hello, Aruba! """ - When
-
I successfully run
cucumber
- Then
- the features should all pass
- Ruby Program
-
- Given
-
an executable named "bin/aruba-test-cli" with:
#!/usr/bin/env ruby puts "Hello, Aruba!"
- When
-
I successfully run
cucumber
- Then
- the features should all pass
- Ruby Program via "ruby"
-
- Given
-
a file named "features/hello_aruba.feature" with:
Feature: Getting Started With Aruba Scenario: First Run of Command Given a file named "cli.rb" with: """ puts "Hello, Aruba!" """ When I successfully run
ruby ./cli.rb
Then the output should contain: """ Hello, Aruba! """ - When
-
I successfully run
cucumber
- Then
- the features should all pass
- Python Program
-
- Given
-
an executable named "bin/aruba-test-cli" with:
#!/usr/bin/env python print("Hello, Aruba!")
- When
-
I successfully run
cucumber
- Then
- the features should all pass
- Python Program via "python"
-
- Given
-
a file named "features/hello_aruba.feature" with:
Feature: Getting Started With Aruba Scenario: First Run of Command Given a file named "cli.py" with: """ print("Hello, Aruba!") """ When I successfully run
python ./cli.py
Then the output should contain: """ Hello, Aruba! """ - When
-
I successfully run
cucumber
- Then
- the features should all pass
- Perl Program
-
- Given
-
an executable named "bin/aruba-test-cli" with:
#!/usr/bin/env perl print "Hello, Aruba!\n";
- When
-
I successfully run
cucumber
- Then
- the features should all pass
- Perl Program via "perl"
-
- Given
-
a file named "features/hello_aruba.feature" with:
Feature: Getting Started With Aruba Scenario: First Run of Command Given a file named "cli.pl" with: """perl print "Hello, Aruba!\n"; """ When I successfully run
perl ./cli.pl
Then the output should contain: """ Hello, Aruba! """ - When
-
I successfully run
cucumber
- Then
- the features should all pass
- Java Program
-
It's even possible to compile and run Java programs with Aruba.
- Given
-
a file named "features/hello_aruba.feature" with:
Feature: Getting Started With Aruba Scenario: First Run of Command Given a file named "tmp/HelloArubaApp.java" with: """ class HelloArubaApp { public static void main(String[] args) { System.out.println("Hello, Aruba!"); } } """ And I successfully run
javac tmp/HelloArubaApp.java
And I cd to "tmp/" And I successfully runjava HelloArubaApp
Then the output should contain: """ Hello, Aruba! """ - When
-
I successfully run
cucumber
- Then
- the features should all pass
- POSIX standard tools
-
- Given
-
a file named "features/hello_aruba.feature" with:
Feature: Getting Started With Aruba Scenario: First Run of Command Given I successfully run
printf "%s" "Hello, Aruba!"
Then the output should contain: """ Hello, Aruba! """ - When
-
I successfully run
cucumber
- Then
- the features should all pass
Last published almost 6 years ago by philoserf.