Download the PHP package kingdutch/cucumber-linter without Composer

On this page you can find all versions of the php package kingdutch/cucumber-linter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cucumber-linter

Cucumber Linter - Static analysis tool for Cucumber and Behat


Cucumber Linter focuses on providing consistent formatting for Cucumber (.feature) files.

Getting Started

Cucumber Linter requires PHP >= 8.0 to function. The linter expects your files to have the .feature extension.

Installation

To start linting your Cucumber/Gherkin files, require Cucumebr Linter using Composer.

Composer will install Cucumber Linter’s executable in its bin-dir which defaults to vendor/bin.

You can also download the latest PHAR and just use that.

Running the linter

To lint your test files, point the linter to the right file(s) or directory.

For example to lint your checkout and login Behat files:

Rules enforced

In this initial release the linter does not provide a way to configure which rules are running or add rules, but has a hardcoded list of rules.

Current rules are aimed at writing focused and consistent tests that clearly test a single thing. Tests should go through the three stages of arrange, act, assert. In the arrange stage pre-required existing (tested elsewhere) functionality is scaffolded. In the act stage we're taking some user action that triggers business logic. In the assert state we verify that the result of the action with the business logic has the desired result.

Scenarios should be written in such a way that the different stages of a test are easily identifyable. Additionally each stage should only occur once. A repetition of a stage suggests the test may be unfocused and should be split into multiple scenarios. Keeping scenario's focused on testing a limited scope provides stakeholders with the most information when they fail and reduces the scope of work that requires debugging to find a cause.

Requires backgrounds to be non-empty

Empty backgrounds will not cause errors in test executors but they create visual noise for people reading the test and it provides unclarity over the test writer's intentions.

Requires the first step in a background to be Given

Backgrounds provide shared scaffolding so they should always be an extension of the arrange phase, hence Given.

Requires subsequent steps in a background to start with And

Backgrounds provide shared scaffolding so they should always be an extension of the arrange phase, so subsequent steps to the first one are part of the same stage denoted by And.

Requires indentation within backgrounds and scenario's to be constant

This ensures there's a consistent left indentation for the eye to jump back to when reading the test file as test.

Requires a blank line before When and Then blocks

This provides the visual separation between the different phases in a test allowing for easy scannability.

Requires the first step in a scenario to be Given

The first step in a test should be to arrange the system into a known working state, this is signaled by Given.

Requires Given, When, and Then to occur exactly once in a scenario in order

Repetition of words signalling a certain stage indicate that a scenario should probably be split up. Enforcing the Given, When, and Then order enforces the arrange, act, and assert order of the scenario.

Contributing

Any contributions are welcome. Cucumber Linter's source code open to pull requests lives at kingdutch/cucumber-linter-src.


All versions of cucumber-linter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kingdutch/cucumber-linter contains the following files

Loading the files please wait ....