Skip to content

Commit 466f0a4

Browse files
committed
Added tags to the feature files and build.gradle
1 parent bfb5693 commit 466f0a4

8 files changed

Lines changed: 44 additions & 31 deletions

File tree

build.gradle

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,6 @@ repositories {
1111
mavenLocal()
1212
mavenCentral()
1313
google()
14-
// maven {
15-
// url = uri('https://repository.jboss.org/nexus/content/groups/public-jboss/')
16-
// }
17-
//
18-
// maven {
19-
// url = uri('https://repo1.maven.org/maven2/')
20-
// }
21-
//
22-
// maven {
23-
// url = uri('https://repository.jboss.org/nexus/content/groups/public')
24-
// }
25-
//
26-
// maven {
27-
// url = uri('https://oss.sonatype.org/content/repositories/snapshots')
28-
// }
29-
//
30-
// maven {
31-
// url = uri('https://repo.maven.apache.org/maven2/')
32-
// }
3314
}
3415

3516
dependencies {
@@ -54,9 +35,10 @@ description = 'browserstack-examples-cucumber-testng'
5435
java.sourceCompatibility = JavaVersion.VERSION_1_8
5536

5637
tasks.named('test') {
38+
systemProperty "cucumber.filter.tags", System.getProperty("cucumber.filter.tags")
39+
systemProperty "dataproviderthreadcount", System.getProperty("num.parallels")
5740
useTestNG() {
5841
suites 'src/test/resources/conf/testng.xml'
5942
parallel = 'methods'
60-
threadCount = 20
6143
}
6244
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
testEndpoint: https://bstackdemo.com
2+
3+
driverType: cloudDriver
4+
5+
cloudDriver:
6+
hubUrl: https://hub-cloud.browserstack.com/wd/hub
7+
user: BROWSERSTACK_USERNAME
8+
accessKey: BROWSERSTACK_ACCESSKEY
9+
localTunnel:
10+
enable: false
11+
common_capabilities:
12+
project: BrowserStack Demo Repository
13+
buildPrefix: browserstack-examples-cucumber-testng
14+
capabilities:
15+
browserstack.debug: true
16+
browserstack.networkLogs: true
17+
browserstack.console: debug
18+
# browserstack.idleTimeout: 300
19+
platforms:
20+
- name: Win10_Chrome_Latest-1
21+
os: Windows
22+
os_version: '10'
23+
browser: Chrome
24+
browser_version: latest-1
25+
capabilities:
26+
browserstack.selenium_version: 3.141.59

src/test/resources/capabilities.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ cloudDriver:
4444
# os_version: Catalina
4545
# browser: Safari
4646
# browser_version: '13.0'
47-
# - name: Android_Samsung Galaxy S21_11.0
48-
# os: Android
49-
# os_version: '11.0'
50-
# device: Samsung Galaxy S21
51-
# real_mobile: true
47+
- name: Android_Samsung Galaxy S21_11.0
48+
os: Android
49+
os_version: '11.0'
50+
device: Samsung Galaxy S21
51+
real_mobile: true
5252
# - name: iOS_iPhone XS_13.0
5353
# os: iPhone
5454
# os_version: '13.0'

src/test/resources/features/e2e.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Feature: End to End Feature
2-
2+
3+
@e2e
34
Scenario: End to End Scenario
45
Given I navigate to website
56
And I SignIn as "fav_user" with "testingisfun99" password

src/test/resources/features/login.feature

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Feature: Login Feature
22

3+
@user @examples
34
Scenario Outline: Login with given <username> user
45
Given I navigate to website
56
And I click on "Sign In" link
@@ -12,12 +13,12 @@ Feature: Login Feature
1213
| 'fav_user' | 'testingisfun99' |
1314
| 'image_not_loading_user' | 'testingisfun99' |
1415
| 'existing_orders_user' | 'testingisfun99' |
15-
16-
16+
17+
@user
1718
Scenario: Login as Locked User
1819
Given I navigate to website
1920
And I click on "Sign In" link
2021
And I type "locked_user" in "username"
2122
And I type "testingisfun99" in "password"
2223
And I press Log In Button
23-
Then I should see "Your account has been locked." as Login Error Message
24+
Then I should see "Your account has been locked." as Login Error Message

src/test/resources/features/offers.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Feature: Offers Feature
22

3+
@offers
34
Scenario: Offers for Mumbai location
45
Given I navigate to website
56
And I SignIn as "fav_user" with "testingisfun99" password
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Feature: Product Feature
22

3+
@filter
34
Scenario: Apply Apple Vendor Filter
45
Given I navigate to website
56
And I press the Apple Vendor Filter
67
Then I should see 9 items in the list
7-
88

99
Scenario: Apply Lowest to Highest Order By
1010
Given I navigate to website
1111
And I order by lowest to highest
12-
Then I should see prices in ascending order
12+
Then I should see prices in ascending order

src/test/resources/features/user.feature

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
Feature: User Feature
22

3+
@fail @user
34
Scenario: Login as User with no image loaded
45
Given I navigate to website
56
And I SignIn as "image_not_loading_user" with "testingisfun99" password
67
Then I should see no image loaded
78

9+
@user
810
Scenario: Login as User with existing Orders
911
Given I navigate to website
1012
And I SignIn as "existing_orders_user" with "testingisfun99" password

0 commit comments

Comments
 (0)