test::bdd::cucumber::stepfile(3pm) [debian man page]
Test::BDD::Cucumber::StepFile(3pm) User Contributed Perl Documentation Test::BDD::Cucumber::StepFile(3pm)NAME
Test::BDD::Cucumber::StepFile - Functions for creating and loading Step Definitions
VERSION
version 0.11
DESCRIPTION
Provides the Given/When/Then functions, and a method for loading Step Definition files and returning the steps.
SYNOPSIS
Defining steps:
#!perl
use strict; use warnings; use Test::More;
use Test::BDD::Cucumber::StepFile;
use Method::Signatures; # Allows short-hand func method
Given 'something', func ($c) { print "YEAH!" }
When qr/smooooth (d+)/, func ($c) { print "YEEEHAH $1" }
Then qr/something (else)/, func ($c) { print "Meh $1" }
Step qr/die now/, func ($c) { die "now" }
Loading steps, in a different file:
use Test::BDD::Cucumber::StepFile;
my @steps = Test::BDD::Cucumber::StepFile->load('filename_steps.pl');
EXPORTED FUNCTIONS
Given
When
Then
Step
Accept a regular expression or string, and a coderef. Some cute tricks ensure that when you call the "load()" method on a file with these
statements in, these are returned to it...
load
Loads a file containing step definitions, and returns a list of the steps defined in it, of the form:
(
[ 'Given', qr/abc/, sub { etc } ],
[ 'Step', 'asdf', sub { etc } ]
)
AUTHOR
Peter Sergeant "pete@clueball.com"
LICENSE
Copyright 2011, Peter Sergeant; Licensed under the same terms as Perl
perl v5.14.2 2012-05-20 Test::BDD::Cucumber::StepFile(3pm)
Check Out this Related Man Page
Test::BDD::Cucumber::Manual::Integration(3pm) User Contributed Perl Documentation Test::BDD::Cucumber::Manual::Integration(3pm)NAME
Test::BDD::Cucumber::Manual::Integration - Integrating with Test::Builder
VERSION
version 0.11
DESCRIPTION
How to use Test::BDD::Cucumber in your test suite
OVERVIEW
You may well want your Cucumber tests to be executed as part of your standard test-suite. Luckily, this is SUPER easy.
WELL-COMMENTED EXAMPLE
#!perl
use strict;
use warnings;
use FindBin::libs;
# This will find step definitions and feature files in the directory you point
# it at below
use Test::BDD::Cucumber::Loader;
# This harness prints out nice TAP
use Test::BDD::Cucumber::Harness::TestBuilder;
# Load a directory with Cucumber files in it. It will recursively execute any
# file matching .*_steps.pl as a Step file, and .*.feature as a feature file.
# The features are returned in @features, and the executor is created with the
# step definitions loaded.
my ( $executor, @features ) = Test::BDD::Cucumber::Loader->load(
't/cucumber_core_features/' );
# Create a Harness to execute against. TestBuilder harness prints TAP
my $harness = Test::BDD::Cucumber::Harness::TestBuilder->new({});
# For each feature found, execute it, using the Harness to print results
$executor->execute( $_, $harness ) for @features;
done_testing;
perl v5.14.2 2012-05-20 Test::BDD::Cucumber::Manual::Integration(3pm)
Dear Guys ,
Can anyone advise me , how can i configuer this firewall ( SunScreen 3.0 ) . i need basic steps and advises .
or if there is a link that i can find the steps how to configuer it .
thx (1 Reply)
Hello !!!
I´m really new at Unix and have to write a script to copy some files from some locations to another one.
I need to be sure that each file has finished copied before starting to copy the other one. I believe unix returns the control to a script before the command really ends.
my... (14 Replies)
Hi Everyone,
Each time I do update the crontab, it gets reset after exiting from the telnet session. I'm using Solaris 2.8
So it goes like this:
Step 1: Login as root, from a telnet session
Step 2: Crontab -e (I make modification)
Step 3: Save and exit
Step 4: Type crontab -l , changes... (4 Replies)
I am a newbie to shell programming. Can someone help me with the following ?
Shell script that accomplishes the following -
# Step 1 List all files in the directory
# Step 2 Loop through each filename say a.htm and MD5 hash the filename to say b.htm
# Step 3 copy a.htm to b.htm
# Step 4... (1 Reply)
Hi All,
How can I script the following logic?
Step 1: Check if the file xyz.txt exists under direcotry test and if the size of the file xyz.txt is greater than 32MB.
Step 2: If the above conditions are true(file exists and size >32 MB), then step 3, otherwise step 4 (file does not exist or... (2 Replies)
I tried search and didn't see anything - if there is a thread please point me to it -
I want to add a couple of statements to the start up steps basically to touch a file and set the owner & group on it.
I want this to happen every start-up. I haven't had sysadm class since HP-UX 9.x and I... (1 Reply)
Hi I have to eliminate all characters between ^ and a space in a file.
Following lines -
Test ^ H^@^@^@^@^@^@^B^VDM-BM-$|M-^_M-F^AM- File1
Test^H^@^@^@^@^@^F^A^X^@^SM-s^TM-3M-G^A File2
Should be printed as below
Test File1
Test File2
I used sed '/^/,/ /d' command, but it is not working.... (1 Reply)
Scenario:
Step 1. I'm logging into AIX server using user id called user1
Step 2. I'm traversing to home directory of user2
Note: This user2's home directory has the permissions drwxr-s---
Step 3. I'm issuing command pwd there. I'm getting the expected output.
Step 4. I'm issuing the... (3 Replies)
Hi,
Pls check that '|' and '+' present in Step-1 are not copied to log file in Step-3.
Pls suggest how to get the exact output from Step-1 (i.e. with out losing '|' and '+') in to a log file
~Thanks
Step-1: Execute command
> mysql -utest -ptest -htesthost testdb -e "select * from... (3 Replies)
Hello, I need some help to correct my algorithm steps to sum a number. I am confused... please input some steps
Example:
Let's say a number 5.
Now we can get a list of numbers: 1, 2, 3, 4 (less than 5 in sorted order).
so the sum could be: 1+4; 2+3 ( 1+1+1+1+1 or 1+2+2 is not a solution).
... (1 Reply)
Hi,
I need to run start_load function for two tables.
Step 1: if HMAX_TBL_ID and GMAX_TBLI_D are same for tab_name1 then echo message "all table ids are processed"
Step 2: go back and call start_load for tab_name2 and check if table id are same for table 2 too.
Please let me know how to... (5 Replies)
Hi Guru's,
I just want to have an idea on how to restart a particular step when it fails?
SCENARIO
we have plenty of steps such as the following below:
Step 1
copy file from source to target location which is in a different server.
Step 2
create initial and incremental process
... (4 Replies)
I have a few input values on a form that must be in 0.25 steps, how do I force this ? alternatively how do I automatically enter the correct vales as the user types and disallow any other values ie: as the firstnumber is typed (say 3) then .00 is added, then as the decimal point and the first... (5 Replies)
Hi All,
Can any one Explain Me Step by Step installing SCO 5.0.7v in ESXi 6.0 ??
When i was trying to install its is not booting into operating systems !!
showing an error no operating systems in media !!
Thanks in Advance!! Please take some time in helping me !!
Kanthi Kiran K (3 Replies)