|
1 |
| -# Serenity/JS Cucumber WebdriverIO Template |
2 |
| - |
3 |
| -[](https://github.com/serenity-js/serenity-js-cucumber-webdriverio-template/actions) |
4 |
| -[](https://github.com/serenity-js/serenity-js) |
5 |
| -[](https://stackoverflow.com/questions/tagged/serenity-js) |
6 |
| -[](https://gitpod.io/from-referrer/) |
| 1 | +# Serenity/JS Mocha WebdriverIO Template |
7 | 2 |
|
8 | 3 | [](https://www.linkedin.com/company/serenity-js)
|
9 | 4 | [](https://www.youtube.com/@serenity-js)
|
10 | 5 | [](https://matrix.to/#/#serenity-js:gitter.im)
|
| 6 | +[](https://github.com/serenity-js/serenity-js) |
11 | 7 | [](https://github.com/sponsors/serenity-js)
|
12 | 8 |
|
13 |
| -Use this [template repository](https://help.github.com/en/articles/creating-a-repository-from-a-template) |
14 |
| -to get started with acceptance testing your web applications using [Serenity/JS](https://serenity-js.org), |
15 |
| -[Cucumber](https://github.com/cucumber/cucumber-js) and [WebdriverIO](https://webdriver.io/). |
| 9 | +[](https://github.com/serenity-js/serenity-js-cucumber-webdriverio-template/actions) |
| 10 | +[](https://gitpod.io/from-referrer/) |
| 11 | + |
| 12 | + |
| 13 | +Kickstart your web application acceptance testing with [Serenity/JS](https://serenity-js.org), [Cucumber](https://github.com/cucumber/cucumber-js), |
| 14 | +and [WebdriverIO](https://webdriver.io/) using this template repository. |
16 | 15 |
|
17 |
| -Learn more: |
18 |
| -- [Serenity BDD reports for this project](https://serenity-js.github.io/serenity-js-cucumber-webdriverio-template/) |
19 |
| -- [Serenity/JS website, tutorials, and API docs](https://serenity-js.org/) |
| 16 | +Learn more about Serenity/JS: |
| 17 | +[Serenity/JS and WebdriverIO guide](https://serenity-js.org/handbook/test-runners/webdriverio/) |
20 | 18 |
|
21 |
| -## Usage |
| 19 | +## 🚀 Quick Start |
22 | 20 |
|
23 |
| -This repository is a GitHub template. You can use it to [create a new GitHub repository](https://help.github.com/en/articles/creating-a-repository-from-a-template), [clone it to your computer](https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/cloning-a-repository). |
| 21 | +### 1. Create a Project |
24 | 22 |
|
25 |
| -You can also launch it in a virtual Gitpod workspace without having to install anything on your machine: |
| 23 | +This repository is a GitHub template. Use it to [create a new GitHub repository](https://help.github.com/en/articles/creating-a-repository-from-a-template) |
| 24 | +for your project. |
| 25 | + |
| 26 | +If you prefer to work in a virtual environment, you can launch this repository in a [Gitpod](https://gitpod.io/from-referrer/) workspace. |
26 | 27 |
|
27 | 28 | [](https://gitpod.io/from-referrer/)
|
28 | 29 |
|
29 |
| -### Installation |
| 30 | +### 2. Set Up Your Environment |
| 31 | + |
| 32 | +Install the required tools: |
| 33 | + |
| 34 | +- [Node.js](https://nodejs.org/en/) (LTS version 18.12 or later) |
30 | 35 |
|
31 |
| -To use this project, you'll need: |
32 |
| -- Node.js, a Long-Term Support (LTS) release version 16 or later - [download](https://nodejs.org/en/) |
33 |
| -- Java Runtime Environment (JRE) or a Java Development Kit (JDK) version 11 or later - [download](https://adoptopenjdk.net/) |
34 |
| -- Chrome web browser - [download](https://www.google.co.uk/chrome/) |
| 36 | +- [Java](https://adoptopenjdk.net/) (JRE or JDK version 11 or later) |
35 | 37 |
|
36 |
| -Follow the [installation instructions](https://serenity-js.org/handbook/getting-started/installation/) to help you verify your setup. |
| 38 | +Follow the [installation guide](https://serenity-js.org/handbook/getting-started/installation/) to verify your setup. |
| 39 | + |
| 40 | +### 3. Install Dependencies |
| 41 | + |
| 42 | +[Clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) the project and run: |
37 | 43 |
|
38 |
| -Once you have the code on your computer, use your computer terminal to run the following command in the directory where you've cloned the project: |
39 | 44 | ```
|
40 | 45 | npm ci
|
41 | 46 | ```
|
42 | 47 |
|
43 |
| -Running [`npm ci`](https://docs.npmjs.com/cli/v6/commands/npm-ci) downloads the [Node modules](https://docs.npmjs.com/about-packages-and-modules) this project depends on, as well as the latest version of [`chromedriver`](https://www.npmjs.com/package/chromedriver) and the [Serenity BDD CLI](https://github.com/serenity-bdd/serenity-cli) reporter jar. |
44 |
| - |
45 |
| -### Corporate networks |
| 48 | +This installs dependencies, including the [Serenity BDD CLI](https://serenity-js.org/handbook/reporting/serenity-bdd-reporter/). |
46 | 49 |
|
47 |
| -If your network administrators require you to use proxy servers or an internal artifact registry (Artifactory, Nexus, etc.), your development environment might require some additional configuration. |
| 50 | +### 4. Run Tests |
48 | 51 |
|
49 |
| -The easiest way to do it is to create an [`.npmrc` file](https://docs.npmjs.com/cli/v6/configuring-npm/npmrc) in your home directory: |
| 52 | +Use the predefined [NPM scripts](https://docs.npmjs.com/cli/v10/using-npm/scripts) defined in [`package.json`](package.json) to run your tests |
| 53 | +and related tasks: |
50 | 54 |
|
51 | 55 | ```
|
52 |
| -proxy=http://user:[email protected]:8080/ |
53 |
| -https-proxy=http://user:[email protected]:8080/ |
54 |
| -strict-ssl=false |
55 |
| -registry=https://artifactory.mycompany.com/artifactory/ |
| 56 | +npm test # Run tests and generate reports |
| 57 | +npm start # Serve test reports at http://localhost:8080 |
| 58 | +
|
| 59 | +npm run lint # Run code linter |
| 60 | +npm run lint:fix # Try to automatically fix linting issues |
| 61 | +npm run clean # Remove test reports from any previous test run |
56 | 62 | ```
|
57 | 63 |
|
58 |
| -If you encounter issues downloading the Serenity BDD CLI jar, please follow the [detailed instructions in the Serenity/JS Handbook](https://serenity-js.org/api/serenity-bdd/#downloading-the-serenity-bdd-reporting-cli). |
| 64 | +### 5. Write your tests |
| 65 | + |
| 66 | +Test scenarios are located in the [`./test/specs`](/test/specs) directory. |
| 67 | +Modify the examples or write your own scenarios using the [Serenity/JS Screenplay Pattern](https://serenity-js.org/handbook/design/screenplay-pattern/). |
59 | 68 |
|
60 |
| -Similar instructions are available for the [`chromedriver` module](https://www.npmjs.com/package/chromedriver). |
| 69 | +## 🌟 Features |
61 | 70 |
|
62 |
| -### Execution |
| 71 | +- **All automation tools ready to go**: Start testing immediately with WebdriverIO, Serenity/JS and Mocha already integrated and configured. |
| 72 | +- **Serenity BDD Reports**: Serenity BDD reporter pre-configured with reports available at `./target/site/serenity` |
| 73 | + - **Published Reports**: Reports for this repository are published to GitHub Pages and available at https://serenity-js.github.io/serenity-js-cucumber-webdriverio-template/. |
| 74 | +- **Screenplay Pattern**: Out-of-the-box integration with the Serenity/JS actors and Screenplay Pattern APIs |
| 75 | +- **GitHub Actions**: Continuous Integration setup included |
| 76 | +- **VS Code**: Pre-configured for a seamless developer experience |
63 | 77 |
|
64 |
| -The project provides several [NPM scripts](https://docs.npmjs.com/cli/v6/using-npm/scripts) defined in [`package.json`](package.json): |
| 78 | +### 🔧 Configuration for Corporate Networks |
| 79 | + |
| 80 | +If you're behind a proxy or use an internal registry, configure an [`.npmrc` file](https://docs.npmjs.com/cli/v6/configuring-npm/npmrc) in your home directory: |
65 | 81 |
|
66 | 82 | ```
|
67 |
| -npm run lint # runs code linter |
68 |
| -npm run lint:fix # attempts to automatically fix linting issues |
69 |
| -npm run clean # removes reports from any previous test run |
70 |
| -npm test # executes the example test suite |
71 |
| - # and generates the report under ./target/site/serenity |
72 |
| -npm start # starts a mini HTTP server and serves the test reports |
73 |
| - # at http://localhost:8080 |
| 83 | +proxy=http://user:[email protected]:8080/ |
| 84 | +https-proxy=http://user:[email protected]:8080/ |
| 85 | +strict-ssl=false |
| 86 | +registry=https://artifactory.mycompany.com/artifactory/ |
74 | 87 | ```
|
75 | 88 |
|
76 |
| -## Your feedback matters! |
77 |
| - |
78 |
| -Do you find Serenity/JS useful? Give it a ⭐ star on GitHub! |
| 89 | +## 💡️ Learn Serenity/JS |
79 | 90 |
|
80 |
| -[](https://github.com/serenity-js/serenity-js) |
| 91 | +- [Serenity/JS WebdriverIO integration guide](https://serenity-js.org/handbook/test-runners/webdriverio/) - Integrate Serenity/JS with your WebdriverIO test suite, enable Serenity BDD reports, and start using the Screenplay Pattern |
| 92 | +- [Serenity/JS Handbook](https://serenity-js.org/handbook/) - Write high-quality automated acceptance tests with Serenity/JS |
| 93 | +- [Serenity/JS API documentation](https://serenity-js.org/api/) - Explore Serenity/JS modules and features |
| 94 | +- [Serenity/JS Project Templates](https://serenity-js.org/handbook/getting-started/project-templates/) - Kickstart your projects with best practices built right in |
81 | 95 |
|
82 |
| -Found a bug? Need a feature? Raise [an issue](https://github.com/serenity-js/serenity-js/issues?state=open) |
83 |
| -or submit a pull request. |
| 96 | +## 👋 Join the Serenity/JS Community |
84 | 97 |
|
85 |
| -Have feedback? Let me know on [LinkedIn](https://www.linkedin.com/in/janmolak/) or leave a comment in [Serenity/JS discussions on GitHub](/serenity-js/serenity-js/discussions/categories/comments). |
| 98 | +- [Serenity/JS Community chat channel](https://matrix.to/#/#serenity-js:gitter.im) - Meet Serenity/JS developers and maintainers |
| 99 | +- [Serenity/JS Forum](https://github.com/orgs/serenity-js/discussions/categories/how-to) - Find answers to your Serenity/JS questions |
| 100 | +- [Contribute to Serenity/JS](https://serenity-js.org/community/contributing/) - Learn how to propose features, report bugs, and contribute to the Serenity/JS codebase |
86 | 101 |
|
87 |
| -And if you have any questions about the framework, or simply want to say hello to other Serenity/JS developers, join us on [Serenity/JS Community Chat](https://matrix.to/#/#serenity-js:gitter.im). |
| 102 | +## 📣 Stay up to date |
88 | 103 |
|
89 |
| -## Support Serenity/JS |
| 104 | +- [Serenity/JS on YouTube](https://www.youtube.com/@serenity-js) - Subscribe for tutorials, demos, conference talks, and more |
| 105 | +- [Serenity/JS on LinkedIn](https://www.linkedin.com/company/serenity-js) - Follow for release and community event announcements |
| 106 | +- [Serenity/JS on GitHub](https://github.com/serenity-js/serenity-js) - Star Serenity/JS to help others discover the framework! |
90 | 107 |
|
91 |
| -Serenity/JS is a free open-source framework, so we rely on our [wonderful GitHub sponsors](https://github.com/sponsors/serenity-js) to keep the lights on. |
| 108 | +## 💛 Support Serenity/JS |
92 | 109 |
|
93 |
| -If you appreciate all the effort that goes into making sophisticated tools easy to work with, please support our work and [become a Serenity/JS GitHub Sponsor](https://github.com/sponsors/serenity-js) today! |
| 110 | +Support our mission to make test automation collaborative and easier to scale. Become a Serenity/JS GitHub Sponsor today! |
94 | 111 |
|
95 |
| -[](https://www.linkedin.com/company/serenity-js) |
96 |
| -[](https://www.youtube.com/@serenity-js) |
97 |
| -[](https://github.com/sponsors/serenity-js) |
| 112 | +[](https://github.com/sponsors/serenity-js) |
0 commit comments