|
1 | | -<?xml version="1.0" encoding="UTF-8"?> |
2 | | - |
3 | | -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
4 | | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 1 | +<project xmlns="http://maven.apache.org/POM/4.0.0" |
| 2 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
5 | 3 | <modelVersion>4.0.0</modelVersion> |
6 | 4 |
|
7 | | - <groupId>com.browserstack.app</groupId> |
8 | | - <artifactId>java-browserstack</artifactId> |
| 5 | + <groupId>com.browserstack</groupId> |
| 6 | + <artifactId>testng-browserstack</artifactId> |
9 | 7 | <version>1.0-SNAPSHOT</version> |
| 8 | + <packaging>jar</packaging> |
10 | 9 |
|
11 | | - <name>java-browserstack</name> |
12 | | - <!-- FIXME change it to the project's website --> |
13 | | - <url>http://www.browserstack.com</url> |
| 10 | + <name>testng-browserstack</name> |
| 11 | + <url>https://www.github.com/browserstack/testng-browserstack</url> |
14 | 12 |
|
15 | 13 | <properties> |
16 | 14 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
17 | 15 | <maven.compiler.source>1.8</maven.compiler.source> |
18 | 16 | <maven.compiler.target>1.8</maven.compiler.target> |
| 17 | + <testng.version>7.4.0</testng.version> |
| 18 | + <surefire.version>2.19.1</surefire.version> |
| 19 | + <selenium.version>4.1.4</selenium.version> |
| 20 | + <json-simple.version>1.1.1</json-simple.version> |
| 21 | + <config.file>config/sample-local-test.testng.xml</config.file> |
19 | 22 | </properties> |
20 | 23 |
|
21 | 24 | <dependencies> |
22 | 25 | <dependency> |
23 | | - <groupId>junit</groupId> |
24 | | - <artifactId>junit</artifactId> |
25 | | - <version>4.11</version> |
26 | | - <scope>test</scope> |
27 | | - </dependency> |
28 | | - <dependency> |
29 | | - <groupId>commons-io</groupId> |
30 | | - <artifactId>commons-io</artifactId> |
31 | | - <version>1.3.2</version> |
| 26 | + <groupId>org.testng</groupId> |
| 27 | + <artifactId>testng</artifactId> |
| 28 | + <version>${testng.version}</version> |
32 | 29 | </dependency> |
33 | 30 | <dependency> |
34 | 31 | <groupId>org.seleniumhq.selenium</groupId> |
35 | 32 | <artifactId>selenium-java</artifactId> |
36 | | - <version>4.1.0</version> |
| 33 | + <version>${selenium.version}</version> |
37 | 34 | </dependency> |
38 | 35 | <dependency> |
39 | 36 | <groupId>com.browserstack</groupId> |
40 | | - <artifactId>browserstack-local-java</artifactId> |
41 | | - <version>1.0.3</version> |
42 | | - </dependency> |
43 | | - <dependency> |
44 | | - <groupId>com.googlecode.json-simple</groupId> |
45 | | - <artifactId>json-simple</artifactId> |
46 | | - <version>1.1.1</version> |
| 37 | + <artifactId>browserstack-java-sdk</artifactId> |
| 38 | + <version>LATEST</version> |
| 39 | + <scope>compile</scope> |
47 | 40 | </dependency> |
48 | 41 | </dependencies> |
49 | 42 |
|
50 | 43 | <build> |
51 | | - <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) --> |
52 | | - <plugins> |
53 | | - <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle --> |
54 | | - <plugin> |
55 | | - <artifactId>maven-clean-plugin</artifactId> |
56 | | - <version>3.1.0</version> |
57 | | - </plugin> |
58 | | - <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging --> |
59 | | - <plugin> |
60 | | - <artifactId>maven-resources-plugin</artifactId> |
61 | | - <version>3.0.2</version> |
62 | | - </plugin> |
63 | | - <plugin> |
64 | | - <artifactId>maven-compiler-plugin</artifactId> |
65 | | - <version>3.8.0</version> |
66 | | - </plugin> |
67 | | - <plugin> |
68 | | - <artifactId>maven-surefire-plugin</artifactId> |
69 | | - <version>2.22.1</version> |
70 | | - </plugin> |
71 | | - <plugin> |
72 | | - <artifactId>maven-jar-plugin</artifactId> |
73 | | - <version>3.0.2</version> |
74 | | - </plugin> |
75 | | - <plugin> |
76 | | - <artifactId>maven-install-plugin</artifactId> |
77 | | - <version>2.5.2</version> |
78 | | - </plugin> |
79 | | - <plugin> |
80 | | - <artifactId>maven-deploy-plugin</artifactId> |
81 | | - <version>2.8.2</version> |
82 | | - </plugin> |
83 | | - <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle --> |
84 | | - <plugin> |
85 | | - <artifactId>maven-site-plugin</artifactId> |
86 | | - <version>3.7.1</version> |
87 | | - </plugin> |
88 | | - <plugin> |
89 | | - <artifactId>maven-project-info-reports-plugin</artifactId> |
90 | | - <version>3.0.0</version> |
91 | | - </plugin> |
92 | | - </plugins> |
93 | | - </pluginManagement> |
| 44 | + <plugins> |
| 45 | + <plugin> |
| 46 | + <artifactId>maven-dependency-plugin</artifactId> |
| 47 | + <executions> |
| 48 | + <execution> |
| 49 | + <id>getClasspathFilenames</id> |
| 50 | + <goals> |
| 51 | + <goal>properties</goal> |
| 52 | + </goals> |
| 53 | + </execution> |
| 54 | + </executions> |
| 55 | + </plugin> |
| 56 | + <plugin> |
| 57 | + <groupId>org.apache.maven.plugins</groupId> |
| 58 | + <artifactId>maven-surefire-plugin</artifactId> |
| 59 | + <version>${surefire.version}</version> |
| 60 | + <configuration> |
| 61 | + <suiteXmlFiles> |
| 62 | + <suiteXmlFile>${config.file}</suiteXmlFile> |
| 63 | + </suiteXmlFiles> |
| 64 | + <argLine> |
| 65 | + -javaagent:${com.browserstack:browserstack-java-sdk:jar} |
| 66 | + </argLine> |
| 67 | + </configuration> |
| 68 | + </plugin> |
| 69 | + <plugin> |
| 70 | + <groupId>org.apache.maven.plugins</groupId> |
| 71 | + <artifactId>maven-compiler-plugin</artifactId> |
| 72 | + <configuration> |
| 73 | + <source>${maven.compiler.source}</source> |
| 74 | + <target>${maven.compiler.target}</target> |
| 75 | + </configuration> |
| 76 | + </plugin> |
| 77 | + </plugins> |
94 | 78 | </build> |
| 79 | + |
95 | 80 | <profiles> |
96 | 81 | <profile> |
97 | | - <id>single</id> |
| 82 | + <id>sample-local-test</id> |
| 83 | + <build> |
| 84 | + <plugins> |
| 85 | + <plugin> |
| 86 | + <groupId>org.apache.maven.plugins</groupId> |
| 87 | + <artifactId>maven-surefire-plugin</artifactId> |
| 88 | + <configuration> |
| 89 | + <suiteXmlFiles> |
| 90 | + <suiteXmlFile>config/sample-local-test.testng.xml</suiteXmlFile> |
| 91 | + </suiteXmlFiles> |
| 92 | + <argLine> |
| 93 | + -javaagent:${com.browserstack:browserstack-java-sdk:jar} |
| 94 | + </argLine> |
| 95 | + </configuration> |
| 96 | + </plugin> |
| 97 | + </plugins> |
| 98 | + </build> |
| 99 | + </profile> |
| 100 | + |
| 101 | + <profile> |
| 102 | + <id>sample-test</id> |
98 | 103 | <build> |
99 | 104 | <plugins> |
100 | 105 | <plugin> |
101 | 106 | <groupId>org.apache.maven.plugins</groupId> |
102 | 107 | <artifactId>maven-surefire-plugin</artifactId> |
103 | 108 | <configuration> |
104 | | - <includes> |
105 | | - <include>com/browserstack/app/JavaSample.java</include> |
106 | | - </includes> |
| 109 | + <suiteXmlFiles> |
| 110 | + <suiteXmlFile>config/sample-test.testng.xml</suiteXmlFile> |
| 111 | + </suiteXmlFiles> |
| 112 | + <argLine> |
| 113 | + -javaagent:${com.browserstack:browserstack-java-sdk:jar} |
| 114 | + </argLine> |
107 | 115 | </configuration> |
108 | 116 | </plugin> |
109 | 117 | </plugins> |
|
0 commit comments