Skip to content
Merged
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
133 changes: 112 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,82 @@
# smartui-github-testing
<h1>Smart UI Testing With GitHub</h1>

For Testing Github App Integration with SmartUI
<img height="400" src="https://user-images.githubusercontent.com/126776938/232716259-60606fe2-d9ed-4449-9586-321a5950308e.png">

<p align="center">
<a href="https://www.lambdatest.com/blog/?utm_source=github&utm_medium=repo&utm_campaign=playwright-sample" target="_bank">Blog</a>
&nbsp; &#8901; &nbsp;
<a href="https://www.lambdatest.com/support/docs/?utm_source=github&utm_medium=repo&utm_campaign=playwright-sample" target="_bank">Docs</a>
&nbsp; &#8901; &nbsp;
<a href="https://www.lambdatest.com/learning-hub/?utm_source=github&utm_medium=repo&utm_campaign=playwright-sample" target="_bank">Learning Hub</a>
&nbsp; &#8901; &nbsp;
<a href="https://www.lambdatest.com/newsletter/?utm_source=github&utm_medium=repo&utm_campaign=playwright-sample" target="_bank">Newsletter</a>
&nbsp; &#8901; &nbsp;
<a href="https://www.lambdatest.com/certifications/?utm_source=github&utm_medium=repo&utm_campaign=playwright-sample" target="_bank">Certifications</a>
&nbsp; &#8901; &nbsp;
<a href="https://www.youtube.com/c/LambdaTest" target="_bank">YouTube</a>
</p>
&emsp;
&emsp;
&emsp;

*Learn the how to get started with testing GitHub app integration with SmartUI on the LambdaTest platform.*

### Getting Started Github App Integration with SmartUI Product - Selenium Automation
[<img height="58" width="200" src="https://user-images.githubusercontent.com/70570645/171866795-52c11b49-0728-4229-b073-4b704209ddde.png">](https://accounts.lambdatest.com/register?utm_source=github&utm_medium=repo&utm_campaign=playwright-sample)

Steps 1: Setup Github App with lambdatest from link github setup

## Table of Contents:

* [Pre-requisites](#pre-requisites)
* [Getting Started With Github App Integration with SmartUI](#getting-started-with-github-app-integration-with-smartui)


## Pre-requisites

* An account with Github with valid permission to install new applications to your repositories.
* Basic understanding of Continuos Integration tools (CI) is required.
* Should have setup the SmartUI suite, else please read [this](https://www.lambdatest.com/support/docs/selenium-visual-regression/).

## Getting Started With Github App Integration with SmartUI

### Steps 1: Integrate the your Lambdatest Account with GitHub App.

You can integrate your LambdaTest account with the GiHub application in the following ways:

- Using OAuth

- Cloud, or
![github-app-landing-92ef6e152a7302cb9ab88f5034b9ec0c](https://user-images.githubusercontent.com/126776938/232715867-f375b4df-1bc9-4e88-8340-44e986be2e9a.png)

- Self Hosted

Step 2: Once setup is done, you will see like
### Step 2: Select your GitHub repository

Step 3: Now you need to setup a sample repository where your test case are mentioned, [smartui-github-testing](https://github.com/LambdaTest/smartui-github-testing)
Go to your GitHub repository where you want to configure your SmartUI project. Check out our GitHub sample [here](https://github.com/LambdaTest/smartui-node-sample).

Step 4: For Github Status updates on PR/ commit need to add capabilities in test suite,
### Step 3: Configure your test suite

```
github: {
"url": "https://api.github.com/repos/OWNER/REPO/statuses/commitId",
"owner": "{OWNER}", //Optional
"repo": "{REPO}", //Optional
"commit": "{commitId}" //Optional
},
Add the `Github` capability to your current test configuration:

```bash
const capabilities: {
platform: "Windows 10",
browserName: "chrome",
version: "latest",
"smartUI.project": "Smart UI sample test",
github: {
"url": "https://api.github.com/repos/OWNER/REPO/statuses/commitId", // Mandatory
"owner": "{OWNER}", //Optional
"repo": "{REPO}", //Optional
"commit": "{commitId}" //Optional
}
}
```

Step5: How to get the `github.url` value in test suite
### Step 4: Setting up your CI configuration

Here we have taken an example of github action, Add below steps in your github action file [.github/workflows/ci.yml](https://github.com/LambdaTest/smartui-github-testing/blob/main/.github/workflows/ci.yml)
Setting up your CI workflow to execute on GitHub. Here is an example setup with `GitHub Actions`:

```
Go to `.github/workflows/<your_ci_file>.yml`.

```bash
name: Execute SmartUI Test with Github App Integration
runs-on: ubuntu-latest
steps:
Expand All @@ -52,7 +95,55 @@ Here we have taken an example of github action, Add below steps in your github a
echo "GITHUB_URL=$GITHUB_URL" >> $GITHUB_ENV
```

### Step5: Execute your test suite with CI

After the setup is completed, you can now execute your test suite with the Continuos Integration (CI) pipeline with any tool of your choice.

**Please Note:** *On running the tests with this repository the user should be able to trigger the `GitHub Action` and execute the `SmartUI` tests for `Selenium`, `Cypress, CDP, and Taiko` frameworks. As this action does not work for `StoryBook`, check our how you can SmartUI test with `StoryBook` [here](https://github.com/LambdaTest/smartui-storybook).*

### Step 6: Commit you changes over git on a branch and raise the PR to main branch.

### Step 7: Now you will see the `lambdatest-smartui-app` in the PR.

## Documentation & Resources :books:

Visit the following links to learn more about LambdaTest's features, setup and tutorials around test automation, mobile app testing, responsive testing, and manual testing.

* [LambdaTest Documentation](https://www.lambdatest.com/support/docs/?utm_source=github&utm_medium=repo&utm_campaign=playwright-sample)
* [LambdaTest Blog](https://www.lambdatest.com/blog/?utm_source=github&utm_medium=repo&utm_campaign=playwright-sample)
* [LambdaTest Learning Hub](https://www.lambdatest.com/learning-hub/?utm_source=github&utm_medium=repo&utm_campaign=playwright-sample)

## LambdaTest Community :busts_in_silhouette:

The [LambdaTest Community](https://community.lambdatest.com/?utm_source=github&utm_medium=repo&utm_campaign=playwright-sample) allows people to interact with tech enthusiasts. Connect, ask questions, and learn from tech-savvy people. Discuss best practises in web development, testing, and DevOps with professionals from across the globe 🌎

## What's New At LambdaTest ❓

To stay updated with the latest features and product add-ons, visit [Changelog](https://changelog.lambdatest.com/)

## About LambdaTest

[LambdaTest](https://www.lambdatest.com?utm_source=github&utm_medium=repo&utm_campaign=playwright-sample) is an intelligent unified digital experience testing cloud that helps businesses drastically reduce time to market through faster test execution, ensuring quality releases and accelerated digital transformation. The platforms allows you to perform both real time and automation testing across 3000+ environments and real mobile devices, making it a top choice among other cloud testing platforms. Over 10,000+ enterprise customers and 2+ million users across 130+ countries rely on LambdaTest for their testing needs.

### Features

* Run Selenium, Cypress, Puppeteer, Playwright, and Appium automation tests across 3000+ real desktop and mobile environments.
* Real-time cross browser testing on 3000+ environments.
* Test on Real device cloud
* Blazing fast test automation with HyperExecute
* Accelerate testing, shorten job times and get faster feedback on code changes with Test At Scale.
* Smart Visual Regression Testing on cloud
* 120+ third-party integrations with your favorite tool for CI/CD, Project Management, Codeless Automation, and more.
* Automated Screenshot testing across multiple browsers in a single click.
* Local testing of web and mobile apps.
* Online Accessibility Testing across 3000+ desktop and mobile browsers, browser versions, and operating systems.
* Geolocation testing of web and mobile apps across 53+ countries.
* LT Browser - for responsive testing across 50+ pre-installed mobile, tablets, desktop, and laptop viewports

[<img height="58" width="200" src="https://user-images.githubusercontent.com/70570645/171866795-52c11b49-0728-4229-b073-4b704209ddde.png">](https://accounts.lambdatest.com/register?utm_source=github&utm_medium=repo&utm_campaign=playwright-sample)

## We are here to help you :headphones:

Step 6: Commit you changes over git on a branch and raise the PR to main branch
* Got a query? we are available 24x7 to help. [Contact Us](mailto:support@lambdatest.com)
* For more info, visit - [LambdaTest](https://www.lambdatest.com/?utm_source=github&utm_medium=repo&utm_campaign=playwright-sample)

Step 7: Now you will see the `lambdatest-smartui-app` check in the PR