Skip to content

Commit 8c075c7

Browse files
Aman1905Ishavyas9
authored andcommitted
smartui-bitucket integration
1 parent e1979ce commit 8c075c7

File tree

4 files changed

+104
-0
lines changed

4 files changed

+104
-0
lines changed
83.2 KB
Loading
84.3 KB
Loading

docs/smartui-with-bitbucket.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
id: smartui-with-bitbucket
3+
title: Bitbucket Pipeline Integration with SmartUI
4+
sidebar_label: Bitbucket
5+
description: SmartUI now integrates with Bitbucket Pipeline to boost pipeline delivery. Perform automated cross browser testing with SmartUI to seamlessly providing 3000+ real browsers running through machines.
6+
keywords:
7+
- lambdatest integrations
8+
- smart ui integration
9+
- smart ui integrations with ci/cd tools
10+
- ci/cd tools
11+
- continuous integration,continuous delivery
12+
- continuous integration tools
13+
- bitbucket ci cd
14+
url: https://www.lambdatest.com/support/docs/smartui-with-bitbucket/
15+
site_name: LambdaTest
16+
slug: smartui-with-bitbucket/
17+
---
18+
19+
<script type="application/ld+json"
20+
dangerouslySetInnerHTML={{ __html: JSON.stringify({
21+
"@context": "https://schema.org",
22+
"@type": "BreadcrumbList",
23+
"itemListElement": [{
24+
"@type": "ListItem",
25+
"position": 1,
26+
"name": "LambdaTest",
27+
"item": "https://www.lambdatest.com"
28+
},{
29+
"@type": "ListItem",
30+
"position": 2,
31+
"name": "Support",
32+
"item": "https://www.lambdatest.com/support/docs/"
33+
},{
34+
"@type": "ListItem",
35+
"position": 3,
36+
"name": "Bitbucket Integration",
37+
"item": "https://www.lambdatest.com/support/docs/smartui-with-bitbucket/"
38+
}]
39+
})
40+
}}
41+
></script>
42+
Bitbucket is a web-based version control repository hosting service owned by Atlassian. It is primarily designed for development teams to manage their code, collaborate on projects, and streamline their workflows.
43+
44+
This document will show you how to integrate Bitbucket Pipeline with SmartUI to shorten your test cycles.
45+
46+
## Steps to Integrate Bitbucket Pipeline with SmartUI
47+
To integrate Bitbucket Pipeline with SmartUI, follow the below steps. You can use your own project to configure and test it. For demo purposes, we are using the sample repository.
48+
49+
:::tip Sample repo
50+
Download or Clone the code sample from the LambdaTest GitHub repository to run the tests on the SmartUI.
51+
52+
<a href="https://github.com/amanchopra1905/smartui-ci-cd-integrations/tree/bitbucket" target="_blank" className="github__anchor"><img loading="lazy" src={require('../assets/images/icons/github.png').default} alt="Image" className="doc_img"/> View on GitHub</a>
53+
:::
54+
55+
### Step 1: Setup your Projects and Repository in Bitbucket
56+
- Click on the **Create** >> **Project**.
57+
- Enter your Project details and click on **Create Project**.
58+
<img loading="lazy" src={require('../assets/images/smart-visual-testing/ci-cd-integration/bitbucket/1.png').default} alt="Create New Project" />
59+
60+
- Now click on the **Create Repository** button. You can either create a new repository or import your existing repository.
61+
62+
<img loading="lazy" src={require('../assets/images/smart-visual-testing/ci-cd-integration/bitbucket/2.png').default} alt="Create New Project" />
63+
64+
### Step 2: Create a New Workflow
65+
- Navigate to the **Deployment** section. Select your required template for CI/CD workflow file. For the demo we are using the Test template.
66+
- Now, write your workflow YAML file. Here is the sample file for your reference.
67+
- Commit this yaml file in your repository and make the required changes in your code to automatically trigger the pipeline.
68+
69+
```yaml title="bitbucket-pipelines.yml"
70+
image: maven:3.8.5-openjdk17 # Image with Maven and OpenJDK
71+
72+
pipelines:
73+
default:
74+
- step:
75+
name: Install Dependencies
76+
script:
77+
- mvn clean install # Installs project dependencies
78+
79+
- step:
80+
name: Configure SmartUI
81+
script:
82+
- npm install -g @lambdatest/smartui-cli # Install SmartUI CLI globally
83+
- npx smartui config:create .smartui.json # Generate SmartUI config file
84+
85+
- step:
86+
name: Run Visual Regression Tests
87+
script:
88+
# Set environment variables directly in the pipeline
89+
- export LT_USERNAME=${LT_USERNAME}
90+
- export LT_ACCESS_KEY=${LT_ACCESS_KEY}
91+
- export PROJECT_TOKEN=${PROJECT_TOKEN}
92+
- npx smartui --config .smartui.json exec -- mvn test -Dsuite=sdk-cloud.xml
93+
```
94+
95+
:::tip
96+
You can also store your *LT_USERNAME*, *LT_ACCESS_KEY* and *PROJECT_TOKEN* as secrets in your Bitbucket project repository.
97+
:::
98+
99+
### Step 3: Check the output
100+
101+
- After triggering the workflow, check your results in the [Smart UI Dashboard](https://smartui.lambdatest.com/projects)
102+
103+
<img loading="lazy" src={require('../assets/images/smart-visual-testing/ci-cd-integration/gitlab/3.png').default} alt="Create New Project" width="" height=""/>

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2818,6 +2818,7 @@ module.exports = {
28182818
items: [
28192819
"smartui-with-github-actions",
28202820
"smartui-with-gitlab",
2821+
"smartui-with-bitbucket"
28212822
],
28222823
},
28232824
{

0 commit comments

Comments
 (0)