22
33# Getting Started with WebTester
44
5+ ** Notice:** For more Examples take a look at:
6+ [ WebTester's Examples Application]
7+ (https://github.com/testIT-WebTester/webtester-examples/tree/master/webtester-example-app/src/test/java )
8+
59## What you'll create
610You'll write a simple GUI test for [ Twitter] ( https://twitter.com/ ) using WebTester that tests basic login
711as well as tweeting a simple message. The end result will be similar to this:
@@ -12,7 +16,7 @@ as well as tweeting a simple message. The end result will be similar to this:
1216
1317- About 30 Minutes
1418- Eclipse (You can use any IDE, but the guide is using Eclipse)
15- - Java 1.7 or newer
19+ - Java 1.6 or newer
1620
1721## Create the project
1822Open Eclipse and create a new Maven project. Leave the default values until the group and artifact Id need be to specified.
@@ -30,15 +34,24 @@ Configure the Maven project to look like this and replace `${webtester-version}`
3034 xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
3135 <modelVersion >4.0.0</modelVersion >
3236
33- <groupId >info.novatec.testit </groupId >
34- <artifactId >webtester-example- twitter</artifactId >
35- <version >0.0. 1-SNAPSHOT</version >
37+ <groupId >com.examples </groupId >
38+ <artifactId >twitter-tests </artifactId >
39+ <version >0.1-SNAPSHOT</version >
3640 <packaging >jar</packaging >
3741
38- <name >webtester-example-twitter</name >
39- <url >https://documentation.novatec-gmbh.de/display/TESTIT</url >
42+ <properties >
43+ <maven .compiler.source>1.6</maven .compiler.source>
44+ <maven .compiler.target>1.6</maven .compiler.target>
45+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
46+ <project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
47+ </properties >
4048
4149 <dependencies >
50+ <dependency >
51+ <groupId >info.novatec.testit</groupId >
52+ <artifactId >webtester-core</artifactId >
53+ <version >${webtester-version}</version >
54+ </dependency >
4255 <dependency >
4356 <groupId >info.novatec.testit</groupId >
4457 <artifactId >webtester-support-firefox</artifactId >
@@ -60,33 +73,7 @@ Configure the Maven project to look like this and replace `${webtester-version}`
6073 <version >1.1.3</version >
6174 </dependency >
6275 </dependencies >
63-
64- <repositories >
65- <repository >
66- <id >novatec</id >
67- <name >NovaTec Public Repository</name >
68- <url >http://repository.novatec-gmbh.de/content/repositories/novatec/</url >
69- </repository >
70- </repositories >
71-
72- <build >
73- <plugins >
74- <plugin >
75- <groupId >org.apache.maven.plugins</groupId >
76- <artifactId >maven-compiler-plugin</artifactId >
77- <version >3.1</version >
78- <configuration >
79- <source >1.7</source >
80- <target >1.7</target >
81- <compilerVersion >1.7</compilerVersion >
82- <encoding >UTF8</encoding >
83- <showWarnings >true</showWarnings >
84- <showDeprecation >true</showDeprecation >
85- </configuration >
86- </plugin >
87- </plugins >
88- </build >
89-
76+
9077</project >
9178```
9279
@@ -249,7 +236,11 @@ public class TweetBox extends PageObject {
249236
250237## Create the Test
251238
252- The ` TwitterTest ` must ` @RunWith ` the ` WebTesterJUnitRunner ` class for JUnit support.
239+ The ` TwitterTest ` makes use of JUnit's ` @RunWith ` annotation with the ` WebTesterJUnitRunner ` class for automated resource
240+ management.
241+
242+ ** In case your tests are already using another JUnit Runner, you'll have to initialize your ``` Browser ```
243+ instances manually. See the [ Browser] ( browser.md ) documentation for details!**
253244
254245In this example the ` @CreateUsing ` annotation specifies the ` Browser ` to be an instance of Firefox.
255246
0 commit comments