Skip to content

Commit 97defbe

Browse files
authored
Updated test to run on local Chrome instance. (#139)
1 parent f882300 commit 97defbe

File tree

5 files changed

+145
-86
lines changed

5 files changed

+145
-86
lines changed

.circleci/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ workflows:
2626
branches:
2727
<<: *all
2828
- maven-deploy/test:
29+
command: |
30+
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
31+
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
32+
sudo apt-get update
33+
sudo apt-get install google-chrome-stable
34+
mvn org.jacoco:jacoco-maven-plugin:prepare-agent install -Pcoverage-per-test
2935
requires:
3036
- maven-deploy/build
3137
filters:

testng-browserstack.xml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!--
4+
~ Copyright (c) 2019, Wasiq Bhamla.
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License. -->
16+
17+
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
18+
19+
<suite name="BrowserStack Suite" thread-count="5" parallel="tests">
20+
<test name="Test BrowserStack Chrome">
21+
<parameter name="test.browser" value="REMOTE" />
22+
<parameter name="test.config"
23+
value="./src/test/resources/config/browserstack/selenium-chrome-config.yaml" />
24+
<classes>
25+
<class name="com.github.wasiqb.coteafs.selenium.SeleniumTest">
26+
<methods>
27+
<include name="testLogin" />
28+
<include name="testCheckboxes" />
29+
<include name="testDropDownBox" />
30+
</methods>
31+
</class>
32+
</classes>
33+
</test>
34+
<test name="Test BrowserStack Firefox">
35+
<parameter name="test.browser" value="REMOTE" />
36+
<parameter name="test.config"
37+
value="./src/test/resources/config/browserstack/selenium-firefox-config.yaml" />
38+
<classes>
39+
<class name="com.github.wasiqb.coteafs.selenium.SeleniumTest">
40+
<methods>
41+
<include name="testLogin" />
42+
</methods>
43+
</class>
44+
</classes>
45+
</test>
46+
<test name="Test BrowserStack Edge">
47+
<parameter name="test.browser" value="REMOTE" />
48+
<parameter name="test.config"
49+
value="./src/test/resources/config/browserstack/selenium-edge-config.yaml" />
50+
<classes>
51+
<class name="com.github.wasiqb.coteafs.selenium.SeleniumTest">
52+
<methods>
53+
<include name="testLogin" />
54+
</methods>
55+
</class>
56+
</classes>
57+
</test>
58+
<test name="Test BrowserStack IE">
59+
<parameter name="test.browser" value="REMOTE" />
60+
<parameter name="test.config"
61+
value="./src/test/resources/config/browserstack/selenium-ie-config.yaml" />
62+
<classes>
63+
<class name="com.github.wasiqb.coteafs.selenium.SeleniumTest">
64+
<methods>
65+
<include name="testLogin" />
66+
</methods>
67+
</class>
68+
</classes>
69+
</test>
70+
</suite>

testng-grid.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!--
4+
~ Copyright (c) 2019, Wasiq Bhamla.
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License. -->
16+
17+
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
18+
19+
<suite name="Selenium Grid Suite">
20+
<test name="Test Grid" enabled="false">
21+
<parameter name="test.browser" value="REMOTE" />
22+
<parameter name="test.config"
23+
value="./src/test/resources/config/grid/selenium-grid-config.yaml" />
24+
<classes>
25+
<class name="com.github.wasiqb.coteafs.selenium.SeleniumTest">
26+
<methods>
27+
<include name="testLogin" />
28+
</methods>
29+
</class>
30+
</classes>
31+
</test>
32+
</suite>

testng-local.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!--
4+
~ Copyright (c) 2019, Wasiq Bhamla.
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License. -->
16+
17+
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
18+
19+
<suite name="Local Suite">
20+
<test name="Test Local">
21+
<classes>
22+
<class name="com.github.wasiqb.coteafs.selenium.SeleniumTest">
23+
<methods>
24+
<include name="testLogin" />
25+
<include name="testCheckboxes" />
26+
<include name="testDropDownBox" />
27+
</methods>
28+
</class>
29+
</classes>
30+
</test>
31+
</suite>

testng.xml

Lines changed: 6 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
1818

19-
<suite name="Suite" thread-count="5" parallel="tests">
19+
<suite name="Coteafs-Selenium Suite">
2020
<listeners>
2121
<listener class-name="com.github.wasiqb.coteafs.listeners.ConfigListener" />
2222
<listener class-name="com.github.wasiqb.coteafs.listeners.SuiteListener" />
@@ -26,89 +26,9 @@
2626
<listener class-name="com.github.wasiqb.coteafs.listeners.AnnotationTransformer" />
2727
<listener class-name="com.github.wasiqb.coteafs.listeners.SuiteResultReporter" />
2828
</listeners>
29-
<test name="Test Local" enabled="false">
30-
<classes>
31-
<class name="com.github.wasiqb.coteafs.selenium.SeleniumTest">
32-
<methods>
33-
<include name="testLogin" />
34-
<include name="testCheckboxes" />
35-
<include name="testDropDownBox" />
36-
</methods>
37-
</class>
38-
</classes>
39-
</test>
40-
<test name="Test Grid" enabled="false">
41-
<parameter name="test.browser" value="REMOTE" />
42-
<parameter name="test.config"
43-
value="./src/test/resources/config/grid/selenium-grid-config.yaml" />
44-
<classes>
45-
<class name="com.github.wasiqb.coteafs.selenium.SeleniumTest">
46-
<methods>
47-
<include name="testLogin" />
48-
</methods>
49-
</class>
50-
</classes>
51-
</test>
52-
<test name="Test BrowserStack Chrome">
53-
<parameter name="test.browser" value="REMOTE" />
54-
<parameter name="test.config"
55-
value="./src/test/resources/config/browserstack/selenium-chrome-config.yaml" />
56-
<classes>
57-
<class name="com.github.wasiqb.coteafs.selenium.SeleniumTest">
58-
<methods>
59-
<include name="testLogin" />
60-
<include name="testCheckboxes" />
61-
<include name="testDropDownBox" />
62-
</methods>
63-
</class>
64-
</classes>
65-
</test>
66-
<test name="Test BrowserStack Firefox">
67-
<parameter name="test.browser" value="REMOTE" />
68-
<parameter name="test.config"
69-
value="./src/test/resources/config/browserstack/selenium-firefox-config.yaml" />
70-
<classes>
71-
<class name="com.github.wasiqb.coteafs.selenium.SeleniumTest">
72-
<methods>
73-
<include name="testLogin" />
74-
</methods>
75-
</class>
76-
</classes>
77-
</test>
78-
<test name="Test BrowserStack Edge">
79-
<parameter name="test.browser" value="REMOTE" />
80-
<parameter name="test.config"
81-
value="./src/test/resources/config/browserstack/selenium-edge-config.yaml" />
82-
<classes>
83-
<class name="com.github.wasiqb.coteafs.selenium.SeleniumTest">
84-
<methods>
85-
<include name="testLogin" />
86-
</methods>
87-
</class>
88-
</classes>
89-
</test>
90-
<test name="Test BrowserStack IE">
91-
<parameter name="test.browser" value="REMOTE" />
92-
<parameter name="test.config"
93-
value="./src/test/resources/config/browserstack/selenium-ie-config.yaml" />
94-
<classes>
95-
<class name="com.github.wasiqb.coteafs.selenium.SeleniumTest">
96-
<methods>
97-
<include name="testLogin" />
98-
</methods>
99-
</class>
100-
</classes>
101-
</test>
102-
<test name="Test BrowserStack Safari" enabled="false">
103-
<parameter name="test.browser" value="REMOTE" />
104-
<parameter name="test.config"
105-
value="./src/test/resources/config/browserstack/selenium-safari-config.yaml" />
106-
<classes>
107-
<class name="com.github.wasiqb.coteafs.selenium.SeleniumTest">
108-
<methods>
109-
<include name="testLogin" />
110-
</methods>
111-
</class>
112-
</classes>
113-
</test>
29+
<suite-files>
30+
<suite-file path="testng-local.xml" />
31+
<suite-file path="testng-grid.xml" />
32+
<suite-file path="testng-browserstack.xml" />
33+
</suite-files>
11434
</suite>

0 commit comments

Comments
 (0)