Steps:-
- setup mongo
- create database "EndTest"
- Setup usename and pass as root,root respectively in "EndTest" database
- create 2 collection as "EndTestProjectSuiteLinking" and "endTest"
- download json for endtest suite from endtest website and then upload it to "endTest" collection
- go inside mongo-service folder
- run command:- mvn clean install -U
- run command:- java -jar target/mongo-service-1.0-SNAPSHOT.jar
- wait for given log "Started EndTestApplication" in terminal
- open new terminal
- open endTestPage and inspect element.
- open browser console
- type "appID" and hit enter. this will give you AppID
- type "appCode" and hit enter. this will give you appCode
- run below api:-
- curl --location --request GET 'http://localhost:9990/endTest/getSuiteTestIdDateAndSaveInLinkingDB?appId=&appCode=<APP_code>'
- run command:- mvn test -P transform
- above command will create .txt for all suite added in mongo
- run command: mvn test -P DynamicSuite -DsuiteXml=TestSuiteXMLCreation.xml
- above command will create xml runner files and selenium code for each suite.
- set Lambdatest credential via below command. https://automation.lambdatest.com/timeline/?viewType=build&page=1
- run command:- export LT_USERNAME=""
- run command:- export LT_ACCESS_KEY=""
- run each suite via command:- mvn test -P testNGRunner -DsuiteXml=.xml
add key and username for Lambdatest in cucumber.yaml
- create cucumber.yaml file in location src/main/java/cucumberRunnerFiles/testrunner/cucumber.yaml
- add all values and copy template from src/main/java/cucumberRunnerFiles/testrunner/cucumber.yaml.sample.yaml
- do not replace name of cucumber.yaml.sample.yaml file. your key will be public if you do that. this file need to be .gitignore
- create feature file for each java suite file in src/main/java/features
- create a test as a scenario in each feature file.
- create step def in src/main/java/StepDef
- steps will be plan text don't take variables for default steps as your int value in name will be treated as variable.
- use the below command to run your test. CUCUMBER_FILTER_TAGS= mvn test -P cucumberRun -DsuiteXmlFile= -DJENKINS_JOB_IDENTIFIER=<unique build name. use ${BUILD_ID} if using jenkins>
- eg:- CUCUMBER_FILTER_TAGS=@regression_colombia_ecom_1 mvn test -P cucumberRun -DsuiteXmlFile=5Parallel.xml -DJENKINS_JOB_IDENTIFIER=Run1