Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start learning markdown #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/script/STEP
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0
2
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ _Organize ideas and collaborate using Markdown, a lightweight language for text
Do not use quotes on the <details> tag attributes.
-->

<!--step0-->
<!--step0

GitHub is about more than code. It’s a platform for software collaboration, and Markdown is one of the most important ways developers can make their communication clear and organized in issues and pull requests. This course will walk you through creating and using headings more effectively, organizing thoughts in bulleted lists, and showing how much work you’ve completed with checklists. You can even use Markdown to add some depth to your work with the help of emoji, images, and links.

Expand All @@ -38,7 +38,7 @@ GitHub is about more than code. It’s a platform for software collaboration, an
![Create a new repository](https://user-images.githubusercontent.com/1221423/169618722-406dc508-add4-4074-83f0-c7a7ad87f6f3.png)
3. After your new repository is created, wait about 20 seconds, then refresh the page. Follow the step-by-step instructions in the new repository's README.

<!--endstep0-->
endstep0-->

<!--
<<< Author notes: Step 1 >>>
Expand Down Expand Up @@ -96,7 +96,7 @@ _Welcome to "Communicate using Markdown"! :wave:_
Define terms and link to docs.github.com.
-->

<details id=2>
<details id=2 open>
<summary><h2>Step 2: Add an image</h2></summary>

_Great job adding headers to the file :sparkles:_
Expand Down
69 changes: 69 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Cypress framework for automation of Web UI testing
Below is the details to use this framework for web UI automation

## Steps to start your own automation using this boilerplate as a template
1. ### **Creating your own repository**

- Create your own project by clicking at "Use this template" on the top of this page

![image](docs/Use_template.png)

2. ### **Confirm the new repository details**

- Confirm the organisation, fill your repository name, the description, ensure to permit only internal access and click at "Create repository from template"

![image1](docs/screenshot_template.png)

3. ### **Check-out the new project**

We are going to show how to checkout your new project. Remember the name you used before to create your project template

```git clone https://github.com/RoyalAholdDelhaize/your-test-automation-script-name.git```

4. ### **Configuration**

- #### *Add the formatter in the project based on the machine OS. (This is used to run/execute the automation)*
- Download the latest release of the cucumber-json-formatter based on machine OS

[Release-Cucumber-formatter](https://github.com/cucumber/common/releases)

- Place the downloaded file in the formatter folder & rename the file as *cucumber-json-formatter* for Mac & Linux, For Windows rename it to *cucumber-json-formatter.exe*

![image2](docs/formatter_sample.png)

- Update the file name in the package.json file under **cypress-cucumber-preprocessor** section as shown below. *Windows example:*

![image3](docs/package_json.png)

- #### *Update the publisher.mjs file to publish the test reports to Zephyr Scale*
- *const projectKey = 'XX'* in place of XX provide the projectKey of your project
- *const zipFilePath = 'XXXXXXXX'* in place of XXXXXXXX provide the path of the zip reports. For current boiler plate the path is : './reports/testResults.zip'
- *const sourceFilePath = 'XXXXXXXX'* in place of XXXXXXXX provide the path of the json reports. For current boiler plate the path is : './reports/cucumber-report.json'
- Set or Export the environment variable *ZEPHYR_TOKEN* with the value generated post clicking on Zephyr Scale API Access Tokens in your system

![image4](docs/zephyr_token.png)


5. ### **Execution**

- Install Cypress & its' dependencies as mentioned in package.json file of the boilerplate `npm install`

- To run the all the scenarios & publish the report to Zephyr Scale. Execute the command `npm run test-publish`

- To run the scenarios based on tags. Execute the command `npm run test-tags`

- To publish reports to Zephyr Scale run the command. Execute the command `node publisher.mjs`

6. ### **Report**

A JSON report will be generated after the test execution is completed. This file will be saved in the reports folder under the name *cucumber-report.json*

7. ### **CI/CD**

Github Action workflow is also available in this boilerplate. It can be changed in the *pipeline_test.yml* file.

Currently it is set as run the script manually, but it can be changed to kick off the execution based on a pull request/on check-in.

Please refer the Github Action document for further information.

[Github_Action](https://docs.cypress.io/guides/continuous-integration/github-actions#Caching-Dependencies-and-Build-Artifacts)