Friday, September 4, 2020

Framework Structure

 1. Junit+TestNG+Cucumber (Act as a base FW) = Hybrid FW

All Dependancies in pom.xml


Junit Annotations 

@Before

@Test

@After

@Runwith

Junits gives marking with the help of annotation. Its tell its Test Method, Its Prerequisites.

Junit gives execution flow and what will be executed After and Before.



KISS - Keep it simple, Stupid its Design Principle.

When you start to implement FW Development from the Scratch  in that case in early phase FW development is fast and Test case implementation is slow till proper FW not done. 

Plugin

use to execute TC

maven-surefire Plugin add in to POM.xml


Run from command line:

1. make sure your on root Folder, where all file src, pom, target (use command for it- ls)

$ ls

2. mvn clean install (It compile the code and start running TCs)

$ mvn clean install

3. git status 

4. git add . && git commit -m"mistake corrected" && git push origin branch name 

if what to update any changes in branch use above command

if we run 

mvn clean install -Dbrowser=chrome

mvn clean install -Dbrowser=firefox

-Dbrowser - its command for virtual machine to create variable and get browser which set in Test base class file.

String browsersentfromcmnd = System.getProperty("browser");









No comments:

Post a Comment

String

  Java String  class provides a lot of methods to perform operations on strings such as compare(), concat(), equals(), split(), length(), re...