November 16th
Assignment
1. Create a new
project on github with Maven
Uploaded maven
project in our github account.
We have to make our
current directory as our maven project folder.
Then git add
command.
After that git
commit comman d.
git remote add
origin ourGitHubAccountUrl
after that git
push -u origin master or git push -f origin master.
2. Add TestNG
dependencies to that project
adding the testng
dependency to the pom file.
3. Write test cases
classes
We have write test
cases separately. In maven we use this path to write test cases.
/src/test/java/<package-name>
4. Use annotation
based test classes
Annotation mean
that @Test like these expressions. They will explain what is the test
is happening now.
5. Maven test report
To get Maven test
report we have to add Maven-surefire dependency.
Mvn surefile-report
: report
6. Use pre/post test
methods
To do these in
integration test we have to add Maven-failsafe dependency.
7. Try out above
with JUnit & Mockito as well
adding the Junit &
Mockito dependency to the pom file.
0 Comments