yzhe554 / seleniumtests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Run with dataProvider

http://www.mkyong.com/unittest/testng-tutorial-6-parameterized-test/

seleniumtests

For MacOs

Install maven on your mac

Install maven with brew

brew update
brew install maven

Install maven plugin on Eclipse

Maven Eclipse plugin installation step by step

Download chromedriver

ChromeDriver Download

For MacOs users
Download chromedriver_mac32.zip	2015-06-08 13:29:32	3.34MB	

Configure your project

Edit codes in **/seleniumtests/src/test/java/au/com/vclass/init/InitAndFunction.java
public final String web = "http://192.168.1.25/wwork7_/WebApp/web/cviewer5.html";
public final String chromeDriverPath = "/Users/zhengyu/Documents/JavaJar/chromedriver"; 

Edit test suite

Edit files under **/seleniumtests/src/test/java/au/com/vclass/automationtests to change test scope

Here's an idea: why don't we take SuperiorProject and turn it into **Reasonable**Project.

Run tests with command line

Navigate to project folder and run mvn clean test

Check Reports

Report files are under the project folder with the name CombineTest*.html

Maven commands

  1. mvn test
  2. Run All the tests
    
  3. mvn mvn -Dtest=TestCircle test
  4. Specify a test class(Change TestCircle to the class name, for example, CombineTest.java, just use CombineTest) to run
    
  5. mvn mvn -Dtest=TestCircle#xyz test
  6. Run a specified test method in a class. Change xyz to the method name
    

Method query

Description command para ClassName/MethodName
ToolBar Test CombineTest ClassName
SignIn/Off Test SignInTest ClassName
Pen thickness Test CombineTest#penThickness MethodName
Pen color Test CombineTest#penColor MethodName
Page Navigation Test CombineTest#pageNavigation MethodName
Zoom and Scale Test CombineTest#zoomAndScale MethodName
Signin with valid info Test SignInTest#signInWithValidInfo MethodName
Signin witn invalid info Test SignInTest#signInWithInvalidInfo MethodName

About


Languages

Language:HTML 76.4%Language:Java 17.1%Language:CSS 3.9%Language:JavaScript 2.5%