Giter VIP home page Giter VIP logo

docs's Introduction

#StandWithUkraine

Cucumber Documentation

This repository contains the source code for https://cucumber.io/docs.

If you want to read the docs, go there. ☝🏼

Contributing Content

For small edits, the recommended way to contribute is via GitHub. Each page in the documentation will have an Edit link for this purpose.

Working locally

For bigger modifications, the recommended workflow is to edit the documentation locally on your machine, and seeing the results in a web browser.

This involves getting the source code and building the documentation yourself.

Get the source code

git clone https://github.com/cucumber/docs
cd docs

View the site

The website is built with several tools that are distributed as a Docker image.

Install Docker if you don't already have it on your machine.

Build and serve the website:

./docker_shell.sh

Open a browser:

http://localhost:1313

Changes to the contents will be automatically updated in the browser.

Try editing one of the pages under content and see for yourself!

Build the site and check links

When you are done editing, build the site and check links:

./docker_shell.sh make clean
./docker_shell.sh make
./docker_shell.sh make htmlproofer

By default, external links are only checked in CI (because it takes a while). To check external links locally:

CI=true ./docker_shell.sh make htmlproofer

Links that are broken should be removed or replaced, even if they are only temporarily broken. The reason for this is that broken links negatively affect search engine rankings.

Modify theme

See the theme README

Architecture

The site is built with Hugo, a fast static site generator.

We have a custom-built theme for the site in themes/cucumber-hugo. This theme is based on Bulma - a lightweight CSS framework.

The online site is rebuild automatically whenever the git repository receives new commits, either via a git push, or by modifying contents in the CMS.

The Netlify CMS saves contents straight to GitHub using the GitHub API.

Continuous Deployment

GitHub will notify Netlify for every git push thanks to a webhook.

Netlify will then build the site and deploy it if the build is successful.

The build will check for broken links and other problems. Internal and external links are checked by HTMLProofer. Occasionally, the build will fail due to external links being unavailable or giving a timeout. When that happens, please check if these external links are available and if so, 'Retry build' on Netlify.

You can discuss the documentation in the #docs Slack channel. Build notifications are sent to the #bots-docs Slack channel. See https://cucumber.io/support for details on how to access Slack.

docs's People

Contributors

10xtechie avatar alaahong avatar annabaker avatar anton-314159 avatar aslakhellesoy avatar aurelien-reeves avatar davidjgoss avatar declark avatar dependabot[bot] avatar diabolo avatar helenjoscott avatar hertzsprung avatar lisacrispin avatar luke-hill avatar mattwynne avatar mlvandijk avatar mpkorstanje avatar mxygem avatar nhojpatrick avatar olleolleolle avatar plaindocs avatar rebekahlawrence avatar renovate-bot avatar renovate[bot] avatar robzenn92 avatar tomerpacific avatar tsundberg avatar xtrasimplicity avatar zearin avatar zutshiy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

Fix bad html escaping in lists of links

Both

  • content/about/blog-posts.md
  • content/about/related-tools.md

are full of really ugly badly escaped html, and probably need converting to also ugly markdown tables.

Add FAQ

Would it be helpful to add an FAQ page? I've noticed some questions have come up several times just on Slack alone.
Examples:

  • cannot find jvm v2.0 => group id has changed
  • message that steps are not defined even though they are, due to glue path not being configured correctly

Fix css for Ruby examples

Some of the Ruby examples look weird, similar to the number problem earlier (see #43).
Especially when using #{ ... }
This should be fixed (either in css or javascript)

Add missing docs in new menu structure

A list of missing (or incomplete) pages in the new menu structure:

  • "Documentation" ▶︎ Write a brief intro?
  • Guides/10 minute tutorial (JavaScript) ▶︎ Write new content ▶︎ see #103
  • Guides/10 minute tutorial (Ruby) ▶︎ Write new content ▶︎ see #104

Tasks

  • Guides/BDD tutorial (Java) ▶︎ DONE (PR #93)
  • Guides/Testable Architecture "How to have fast and reliable tests" ▶︎ DONE (PR #86)
  • Guides/Browser Automation (NB. Marked "Old") ▶︎ DONE (PR #83 )
  • Documentation/Configuration ▶︎ TODO: Move content from other places ▶︎ DONE (PR #85)
  • Documentation/Overview - "a gentle introduction to Cucumber" ▶︎ DONE (PR #81)
  • BDD/Who does what ▶︎ DONE (PR #81)
  • BDD/Example Mapping ▶︎ TODO: Short version of Matt’s Example Mapping article, link to blog: https://cucumber.io/blog/2015/12/08/example-mapping-introduction ▶︎ DONE (PR #81)

What are the different branches for?

When I opened a PR with documentation updates on the main Cucumber repo, I was instructed to rebase my changes on this repo's sw-reorg branch.

Well, I did. And that’s cool. Trouble is, I still have no idea what the sw- prefixed branches are for. I don’t even know what “sw” means. :)

Can someone explain what the different branches are for? And how they relate to master?

Docs are not showing the cucumber-jvm version correctly

jvm.md is not showing the cucumber jvm version

Actual result:
For instance:

<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>cucumber-scala</artifactId>
    <version>{{ site.versions.cucumber_jvm }}</version>
    <scope>test</scope>
</dependency>

Expected result:

<version>2.1.0</version>

Being able to configure this version somewhere so it shows consistently through the document

Possibly this might help: https://gohugo.io/variables/

Point to this repo for contributions to the documentation

(As discussed on Slack between @aslakhellesoy and myself:)

Summary

All docs updates should be in the new docs.cucumber.io repo

Goal

Prevent duplicated / out of sync documentation, and/or rework to update documentation from other sources into this repo.

Solution

Add info to all individual sets of documentation (at least as mentioned in the README of this repo), placing a "do not update" warning somewhere, with an link pointing to this project for documentation updates.
Information should be placed where contributors are most likely to see that warning, starting with:

  • Contributing.md file (s) in various repos
  • Commit guidelines

TODO:

Add text with a link to this repo to the following repos/documents:

Note: Do not update documentation in this repo. We are busy adding old documentation to a new repository docs.cucumber.io to replace the current documentation on cucumber.io.
Please make ALL contributions to the documentation here.

Text should be added to:

Point CONTRIBUTING.md's in various repos to "Contributing-to-documentation.md" in docs.cucumber.io:

Contributing.md file (s) in various repos:

Doc: Things that are not Cucumber problems

From @aslakhellesoy on November 25, 2016 22:41

Summary

People frequently use Cucumber alongside other tools. For various reasons, many end up asking questions about other tools in the Cucumber forums.

By providing a list of these tools, people are more likely to ask in the right place, and contributors can spend time explaining the same things over and over again.

i got the idea from this page: http://gitolite.com/gitolite/emergencies#things-that-are-not-gitolite-problems

Expected Behavior

User has a question about Selenium
Finds this page
Asks question in most appropriate place

User has a question about Selenium
Asks in Cucumber forum
Contributor sends short email pointing to this page

Current Behavior

User has a question about Selenium
Asks in Cucumber forum (can't find info suggesting a different forum)
May get a reply, may not, because it takes effort to write

Possible Solution

Have a dedicated page to the unrelated thing, linking to this page.

Context & Motivation

Users get more efficient at troubleshooting. Contributors get fewer irrelevant questions.

Copied from original issue: cucumber/common#97

Document build/contributing process for contributors

From @aslakhellesoy on March 21, 2017 23:47

It's a bit daunting for newcomers to find out where and how to make changes.

  • Do I contribute in monorepo or subrepo?
  • How do they get synced?
  • What directory?
  • How does CI work?
  • What software do I need?
  • How do I run a build on my machine?
  • How can I find issues to help on?
  • Where do I send pull requests?
  • When do I get commit rights?
  • Who's on the core team?
  • How do I make a release?

There are some docs about this in the root folder (some of them are out of date). CONTRIBUTING.md is too long and boring.

Let's steal shamelessly from these great projects (with credits):

Some general guides for inspiration:

Copied from original issue: cucumber/common#167

Menu refactoring

I'm going to work on making our left menu more manageable, reduce some sections and lists, reduce white space, etc.

Maybe look at an mini TOC for each page that isn't injected into the menu.

Suggestions welcome.

Ruby code snippets not shown correctly

Ruby code snippets are not shown correctly:

  1. They're not formatted as code blocks
  2. Text of the code block is also shown when Java or Javascript is selected for polyglot page

Missing Watirmelon Links Breaking Netlify Checks

https://app.netlify.com/sites/cucumber/deploys/5a3cc0c88198767e07da8ff5

data from @mlvandijk in #89 :

The following links are failing on HTMLProoofer:
9:23:02 AM: * External link http://watirmelon.com/2011/01/21/my-simple-cucumber-watir-page-object-pattern-framework failed: 404 No error

External link http://watirmelon.com/2011/01/23/reducing-step-explosion-by-decoupling-cucumber-steps-from-your-gui failed: 404 No error
9:23:02 AM: * External link http://watirmelon.com/2011/05/18/specification-by-example-a-love-story failed: 404 No error
9:23:02 AM: * External link http://watirmelon.com/2011/07/04/the-elements-of-cucumber-style failed: 404 No error
9:23:02 AM: * External link http://watirmelon.com/2011/07/04/use-cucumber-feature-folders-for-functional-organization-tags-for-non-functional-classification failed: 404 No error
9:23:02 AM: * External link http://watirmelon.com/2011/08/04/capturing-screenshots-in-watir-webdriver-cucumber failed: 404 No error
9:23:02 AM: * External link http://watirmelon.com/2011/08/07/keeping-the-browser-open-when-youre-writing-a-cucumber-test failed: 404 No error
9:23:02 AM: * External link http://watirmelon.com/2011/08/08/making-your-cucumber-step-definitions-more-readable-with-rspec-binary-matchers failed: 404 No error
9:23:02 AM: * External link http://watirmelon.com/2011/08/10/capturing-page-performance-times-with-my-watirmeloncucumber-framework failed: 404 No error
9:23:02 AM: * External link http://watirmelon.com/2011/08/29/running-your-watir-webdriver-tests-in-the-cloud-for-free failed: 404 No error
I've checked one of them and am getting:"Oops! That page can’t be found."
So these links need to be updated/removed(?)

Document/script Coala

I noticed the /.coafile and discovered it's for a linting tool called Coala, which I'm unfamiliar with. We should:

  • Document what it is and how to use it in CONTRIBUTING.md
  • Make sure it runs as part of CI

Remove `menu` headers from all pages

As we're not using these we should remove them for clarity.

And possibly replace with with a comment pointing to themes/cucumber-hugo/layouts/partials/navbar.html

Unable to create pull request when following current instructions

The README.md specifies that when working locally, you should get the source code by cloning this project. If you do so, it is not possible to create pull request (403 error).
To be able to create a pull request, fork this repo to your own account, make changes there and create a pull request. (I have added this info also to my pull request: a7522cf)

Add info on writing style

Including:

  • Conversational style: your project / feature vs a project / feature
  • Use lower case in sentences: e.g. step definition vs Step Definition
  • Don't use a period at the end of a bullet / numbered list (like this ;) )

Hide the language switcher unless it's relevant

Most of the pages in the current version of the docs don't vary according to your programming language, and it's misleading to show the language switcher tabs on those pages.

It would be better if we can have them only appear when we do have a page that has cross-platform docs on it.

@aslakhellesoy how would we go about doing that? We could disable the tabs by default and put a flag in the YAML frontmatter on the pages that do have cross-platform docs, for example.

Open TODOs in mostly Ruby related docs

Files marked with TODOs

  • wiki/autotest ▶︎ TODO: Keep it or delete it? Note: No active pages link here
  • cucumber/environment variables ▶︎ TODO: Make more general (seems to be a mix of Ruby and JVM?) Note: the following pages link here: cucumber.yml (but is not currently active)
    implementations/ruby/debugging ▶︎ TODO: Review for length Note: environment-variables links here (but is not currently active)
  • /wiki/cucumber-backgrounder/ ▶︎ TODO: Blog post intro or some such (FYI: I did some editing in this already, on branch backgrounder) Note: No active pages link here
  • cucumber/step-arguments-transforms ▶︎ TODO: Ruby specific feature. generalize. Note: No active pages link here
  • implementations/ruby/browsers-and-transactions ▶︎ contains several TODO's Note: No active pages link here
  • implementations/ruby/console-colours ▶︎ TODO: Review. Note: No active pages link here-
  • implementations/perl ▶︎ TODO: Review (Merged/deleted)

Tasks

  • implementations/ruby/custom-formatters ▶︎ TODO: fix link ▶︎ Does not contain any broken links, removed the 'TODO'
  • cucumber/step-organization▶︎ TODO: integrate with step definitions and/or anti-patterns => Suggestion: merge & rewrite to make Good practices? ▶︎ DONE (PR #77)
  • cucumber/running features ▶︎ TODO: Generalize ▶︎ DONE (PR #75)
  • cucumber/mocking and stubbing ▶︎ TODO: Generalize and update ▶︎ DONE (PR #71)
  • cucumber/checking assertions ▶︎ TODO: generalize (atm it has Ruby only) ▶︎ In progress, see PR #69 (Could maybe use more info on Javascript)
  • cucumber/tags ▶︎ TODO: Gherkin and Cucumber. This is mostly Cucumber ▶︎ DONE (PR #63)
  • gherkin/feature-introduction ▶︎ TODO: Gherkin reference ▶︎ DONE (PR #59)
  • about/get in touch ▶︎ Suggestion: Replace with info from current 'Support'-page (https://cucumber.io/support) and move info about issues to contributing? ▶︎ DONE (PR #58)
  • cucumber/hooks ▶︎ TODO: Important. Generalize. ▶︎ DONE (PR #56)
  • gherkin/background ▶︎ TODO: Review. Add to gherkin reference ▶︎ DONE (PR #56)
  • about/related tools - TODO: Clean and delete. Move to json? ▶︎ DONE (PR #45)
  • cucumber/browser automation/#Watir ▶︎ DONE (PR #39)
  • cucumber/feature coupled step definition (antipattern) ▶︎ TODO: Generalize. Move to Step Definitions (atm ruby only, adding java) ▶︎ DONE (PR #39)
  • cucumber/step-definitions ▶︎ Some Ruby specific content ("Where are Step Definitions?") ▶︎ DONE (PR #50)
  • implementations/ruby/calling-steps-from-stepdefinitions ▶︎ DONE (PR #50)
  • Suggestion: merge step-definitions-old.md and step-definitions.md ▶︎ DONE (PR #50)

Edit by Zearin : Formatting to help read the long list :)

[proposal] Add recommended media

Not just current links to blog posts, but also:

  • links to Cucumber books(?)
  • links to Cukenfest videos.
  • links to podcasts (directly to an overview of podcasts, not just from the cucumber blogs)

HTML Proofer retry?

Sometimes the build fails due to (randomly) failing external links.
It would be nice if we could configure HTML Proofer to (for instance) retry 2-3 times if a check on a particular links fails

Links to fix

#Brain dump of links in sw-reorg which either need turning into proper markdown links [text](/path/to/file) or have the [[text]] removing.

Running grep "\[\[" in the content dir should give you an updated list.

wiki/cucumber-backgrounder.md
364:As with `Feature`, `Scenario` is used only for identification when reporting failures and to document a piece of the work. The clauses (*steps*) that make up a Scenario each begin with one of: Given, When, Then, And and But (and sometimes **\***). These are all [[Gherkin]] keywords / Cucumber methods that take as their argument the string that follows. They are the steps that Cucumber will report as passing, failing or pending based on the results of the corresponding step matchers in the step_definitions.rb files. The five keywords (and **\***) are all equivalent to one another and completely interchangeable.
489:Always keep in mind that Cucumber is simply a DSL wrapper around the Ruby language whose full expressiveness remains available to you in the step definition files (*but not in the feature files*). On the other hand, do not lose sight that every step called as such in a step definition file is first parsed by [[Gherkin]] and therefore must conform to the same syntax as used in feature files.

wiki/autotest-integration.md
57:If you get an error like `When using several—format options only one of them can be without a file (RuntimeError)` when running features with autospec, you are probably accidentally requiring 'spec'. Read about the solution on [[Troubleshooting]].

implementations/jvm.md
14:Please see the [[general reference]] for features that are
73:- [[Android Runner]]
149:The [JUnit Runner](#junit-runner) and [[Android Runner]] can also pick
187:Usage: java cucumber.api.cli.Main [options] [[[FILE|DIR][:LINE[:LINE]*] ]+ | @FILE ]
320:If you prefer to use a [[Data Table]] to define a list you can do that too:

implementations/ruby/ruby-on-rails.md
83:If you're on an OS that supports fork we recommend you use [[Spork and --drb]] as this lets you start cucumber faster:
163:Remember that you need AUTOFEATURE=true for autospec to include cucumber features. See [[Running Features]] and \[\[Autotest Integration]] for more info.
176:There are two special [[tags]] you can use to change how Cucumber runs your scenarios
180:By default all scenarios will run within a database transaction that is rolled back at the end. However, scenarios tagged with `@no-txn` will run **without** a transaction. This can be useful when you have to deal with [[Browsers and Transactions]]. Beware that this will leave data in your database after that scenario, which can lead to hard-to-debug failures in subsequent scenarios. If you use this, we recommend you create a Before block that will explicitly put your database in a known state, for example using [DatabaseCleaner](https://github.com/bmabey/database_cleaner)

implementations/ruby/calling-steps-from-step-definitions.md
63:Sometimes you want to call a step that has been designed to take [[Multiline Step Arguments]], for example:

implementations/php.md
95:The per feature and per table approach can be accomplished using [[hooks]].

about/blog-posts.md
10:Please add any helpful blog posts that you have found or written about all things Cucumber. Also see [[Related Tools]].

about/get-in-touch.md
41:- And finally, tell us how to reproduce the error, as described on the [[Contributing]] page.

about/contributing.md
12:Before you [[get in touch]] and file a ticket in the issue tracker, make sure you have tried the latest gem. Also try to \[\[install]] the latest code from Git. This way you don't waste the developers' time by reporting a bug that has already been fixed.
18:The only way we can fix a bug is to reproduce it first. If reproducing the bug requires setting up a project, please write a [[Cucumber Feature]] that demonstrates the bug. When you have done that, mention it in your ticket or send a pull request.
24:Start by creating a ticket. Then, create a [[Cucumber Feature]] and start implementing it. It also helps if you add RSpec specs for the low level code.

gherkin/gherkin-reference.md
10:the [[documentation overview]] for links to platform-specific documentation.
194:You can also use placeholders in [[Multiline Step Arguments]].

gherkin/feature-introduction.md
14:(or localized equivalent; Gherkin is localized for [[dozens of languages|Spoken

cucumber/step-definitions.md
44:Also check out [[Multiline Step Arguments]] for more info on how to pass entire tables or bigger strings to your step definitions.

cucumber/cucumber.yml.md
20:Defining a template requires a name and then the command-line options that you want to execute with this profile. The example above generates two profiles: the first, named `html_report`, with a list of command-line options that specify new output formats and a second, named `bvt` which executes all features and scenarios [[tagged|Tags]] with @bvt.
80:[[Environment Variables]] can be used in the profile argument list for a profile as you would normally specify one on the command-line.
95:[[Integration with Autotest|Autotest-Integration]] uses two profiles `autotest` and `autotest-all`. These profiles should be reserved for that service.

cucumber/running-features.md
70:Maven and Ant are described in [[JRuby and Java]]. MSBuild and Nant should be under [[IronRuby and .NET]]. Anything else - please contribute to this wiki!

cucumber/state.md
22:[[Before Hook]] to remove all data *before* a scenario starts.
24:This is usually better than using an [[After Hook]] as it allows
36:You simply tell Cucumber to start a transaction in a [[Before Hook]] and roll it back
37:in an [[After Hook]].
40:[[Tagged Hooks]] using a tag named `@txn`.
42:To enable it you have to tag every [[Feature]] or [[Scenario]]
58:The [[cucumber-spring]] module contains `@txn` hooks in the `cucumber.api.spring` package.
60:This package isn't on your [[glue path]] by default, so you have to add it yourself in your
61:[[Configuration Options]].

cucumber/step-organization.md
11:How do you name step definition files? What to put in each step definition? What **not** to put in step definitions? Here are some guidelines that will lead to better scenarios. If you are new to steps and the general syntax, please read [[Feature Introduction]] first.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.