Thursday, December 1, 2022

TestNG - files structure

Structure of the TesNG.xml file consists elements as below.

<suite>
    <test name = "">
         <classes>
            <class name="" />
         <classes>
    </test>
    <test name = "">
        <classes>
            <class name="" />
        <classes>
     </test>
</suite>
  • Each testNG xml pockets its content within the parent <suite> tags.
  • test tags is the next main level and you can have many test tags. These specify the module.
  • classes comes next. This helps goup the many classes you have under a certain test module
  • class is the smallest element which carries the class name.
Example of a sample TestNG is as below;
 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite parallel="tests" name="ShoppingCart">

  <test thread-count ="5" name="Submit Order Tests">
    <classes>
      <class name="learningspace.tests.SubmitOrderTest"/>
    </classes>
  </test>
  
  <test thread-count ="5" name="Error Validation Tests">
    <classes>
      <class name="learningspace.tests.ErrorValidationTests"/>
    </classes>
  </test>
  
</suite>

Sunday, November 20, 2022

Beginners spot - Pushing your work to GitHub

 

1. Login to your GitHub account and create the repo

2. Go to command prompt;

git config --global user.name "yumani"

git config --global user.email "yumani@gmail.com"

3. Navigate to the location of the local repo and use the below commands. 

It will initialize the repo, add the files and push to the origin with the comments.

git init

git add *

git status

git commit -m "Adding the initial file set"

git remote add origin https://github.com/yumaniranaweera/snuggery.git

git push origin master

4. You can import the files structure to your Eclipse editor from "File >> Import>>





Featured

Selenium - Page Object Model and Action Methods

  How we change this code to PageObjectModel and action classes. 1 2 3 driver . findElement ( By . id ( "userEmail" )). sendKeys (...

Popular Posts