August 24, 2020

Domain Knowledge for Testers - Banking Domain Knowledge | ECommerce Domain Knowledge | Telecom Domain Knowledge | ERP Domain Knowledge

This blog post relates to domain specific knowledge videos in the Banking, ECommerce, Telecom, ERP and Automotive industry domains. Business domain knowledge is important to be productive as a software tester. What is domain knowledge meaning? Domain knowledge in software testing is knowledge of the concepts, vocabulary and terms used in a particular industry or domain.

Banking Domain Knowledge for Testers | Bank domain knowledge video : This Banking Domain Knowledge or Business Domain Knowledge in the Banking Domain video covers What is Bank, what is Spread, Banking Channels (e.g. ATM banking, internet banking, mobile banking, phone banking, relationship manager banking and DSA banking), Retail Banking products such as Savings bank account, Recurring deposit account, Fixed deposit account, Certificate of deposit, Term deposit, IRA, Credit card, Debit card, ATM card, Mortgage, Mutual fund, Personal loan, Cheque, NEFT and RTGS, and domain knowledge for software testers including Business Banking or Corporate Banking products such as Current account, Overdraft (Revolving Credit), Business loan, Term loan and Cash management) and Investment Banking (raising capital, mergers and acquisitions and trading securities).

ECommerce Domain Knowledge | E commerce domain knowledge for Testers video : The video is on domain specific knowledge in E-Commerce industry. There are both physical and digital ecommerce products and e commerce services. Ecommerce marketing uses email, online advertisements, social media and price comparison websites that use affiliate marketing. ECommerce domain knowledge includes knowledge about B2B (business to business), B2C (business to consumer) and C2C (consumer to consumer) e commerce. Also, ECommerce business knowledge includes knowledge of retail ECommerce, online auctions and Ecommerce market places.

Telecom Domain Knowledge for Testers | Telecom Domain Basics video : This video is on telecom domain knowledge or business domain knowledge in telecom. Telecom  is short for telecommunication. The video covers telecom domain basics like 1G, 2G, 3G, 4G and 5G telecom standards with GSM, CDMA, UMTS, LTE and NR. Also OSS meaning Operations Support Systems and BSS meaning Business Support Systems. This telecom domain training may be useful to build domain knowledge for testers.
OSS TeleCom | What is Oss in Telecom | oss full form in telecom video : This OSS telecom tutorial explains the OSS computer systems that are used in the telecom industry domain. An OSS is used by the telecom provider to manage customer orders and telecom network operations. OSS functions include network inventory (physical and logical), provisioning and activation, assurance of service quality to the customer - preventive service assurance and corrective service assurance, fault management process and customer care with metrics.
BSS TeleCom | What is Bss in Telecom | bss telecom full form - Domain Knowledge (oss bss telecom) video : This BSS telecom tutorial explains the BSS computer systems that are used in the telecom industry domain. Bss in telecommunication domain has important functions or processes used by the telecom provider or telco.  These are product management, new order management, revenue management and customer management. Note that OSS BSS telco communicate with each other.
 
ERP | Erp System | ERP software - Domain Knowledge for Testers video : This video is on ERP domain Knowledge. It covers what is ERP and the benefits of ERP,  Erp system integration and ERP software examples like Tally ERP 9 software,  SAP ERP system (SAP ERP modules and ECC SAP) and Dynamics Nav. This video may be useful to build domain knowledge for software testers.
 
 
Automotive Industry | Automotive Part - Automotive Domain Knowledge video : Automotive industry deals with wheeled automobiles like cars and goods vehicles. An automotive part is a component of an automobile. This video on automotive domain knowledge covers the automotive industry a.k.a. the auto sector, auto part categories and automotive terminology.

August 09, 2020

Selenium Python Tutorial 14 | Selenium Python Unittest Framework with POM | Selenium Unit Testing

This is the next tutorial in the Selenium Python Tutorials for Beginners. It deals with Python Automation Testing with Selenium WebDriver Python. This Selenium Python beginner tutorial deals with the Selenium Python Unittest framework and Selenium unit testing. First, view the Selenium Python Unit Test Tutorial. Then read on.

Here is my Selenium Python example, which is based on the example that I showed in my Selenium Python tutorial 13. This Page Object Model (POM) based Selenium Python example uses the Python unit test framework to run the test methods in a test class. I put explanations in the comments within the code (lines starting with #).

# Test_Cases>WikipediaTestClass1.py
# Selenium WebDriver Python coding
# Import unittest library for working with Selenium Unit Testing Python.
import unittest
from selenium import webdriver
# Import the page object files in the Pages directory.
# The POM files are MainPage.py and EnglishPage.py. Their code is in Selenium Python tutorial 13.
from Pages.MainPage import MainPage
from Pages.EnglishPage import EnglishPage

class WikipediaTestClass1(unittest.TestCase):
    exec_path = r"E:\Training\SeleniumPython\Downloads\geckodriver-v0.26.0-win32\geckodriver.exe"
    base_URL = "https://www.wikipedia.org/"

    # First independent test method to test the main page
    def test_main_page(self):
        driver = webdriver.Firefox(executable_path=self.exec_path)
        driver.get(self.base_URL)
        mp = MainPage(driver)
        mp.test_title()

    # Second independent test method to test the english page
    def test_english_page(self):
        driver = webdriver.Firefox(executable_path=self.exec_path)
        driver.get(self.base_URL)
        mp = MainPage(driver)
        mp.click_english_link()
        ep = EnglishPage(driver)
        ep.search_text()

# Run all test methods using the unit test library.
# In PyCharm, click the green arrow next to this if statement and then click Run 'WikipediaTestClass1'.
if __name__ == "__main__": unittest.main()

Next, in this Selenium WebDriver Python tutorial, let us see the Selenium Python example to skip test methods using Selenium Python. I modified the above Python script to skip test methods.

# Test_Cases>WikipediaTestClass2.py
# Selenium WebDriver Python coding
import unittest
from selenium import webdriver
from Pages.MainPage import MainPage
from Pages.EnglishPage import EnglishPage

class WikipediaTestClass2(unittest.TestCase):
    # run_all_test_cases variable is used to skip unit tests conditionally.
    run_all_test_cases = False
    exec_path = r"E:\Training\SeleniumPython\Downloads\geckodriver-v0.26.0-win32\geckodriver.exe"
    base_URL = "https://www.wikipedia.org/"

    # If you want to skip unit test with condition, use the skipIf unit test annotation.
    @unittest.skipIf(run_all_test_cases==False, "This is a medium priority test case.")
    def test_main_page(self):
        driver = webdriver.Firefox(executable_path=self.exec_path)
        driver.get(self.base_URL)
        mp = MainPage(driver)
        mp.test_title()

    # If you want to skip unit test, uncomment the unit test annotation.
 # @unittest.SkipTest
    def test_english_page(self):
        driver = webdriver.Firefox(executable_path=self.exec_path)
        driver.get(self.base_URL)
        mp = MainPage(driver)
        mp.click_english_link()
        ep = EnglishPage(driver)
        ep.search_text()

if __name__ == "__main__":
    unittest.main()

Finally, let us see the Selenium Python example with unit testing setup method and unit testing teardown method. I added these unit test special methods, the unit testing set up method and and unit testing tear down method to the above Python script.

# Test_Cases>WikipediaTestClass3.py
# Selenium WebDriver Python coding
import unittest
from selenium import webdriver
from Pages.MainPage import MainPage
from Pages.EnglishPage import EnglishPage

class WikipediaTestClass3(unittest.TestCase):
    exec_path = r"E:\Training\SeleniumPython\Downloads\geckodriver-v0.26.0-win32\geckodriver.exe"
    base_URL = "https://www.wikipedia.org/"
    driver = webdriver.Firefox(executable_path=exec_path)

    # unit test setUp method runs before every test method. 
    #  Notice the @classmethod unit test annotation.
    @classmethod
    def setUp(self):
        print("This method runs before every test method.")
        self.driver.get(self.base_URL)

    # unit test tearDown method runs after every test method. 
    #  Notice the @classmethod unit test annotation.
    @classmethod
    def tearDown(self):
        print ("This method runs after every test method.")

    def test_main_page(self):
        mp = MainPage(self.driver)
        mp.test_title()

    def test_english_page(self):
        mp = MainPage(self.driver)
        mp.click_english_link()
        ep = EnglishPage(self.driver)
        ep.search_text()

if __name__ == "__main__":
    unittest.main()

Want to see the Python unit test library run the above Selenium Python examples? Then view my Python Selenium UnitTest Tutorial and Selenium Python Unit Testing with POM Tutorial. Thank you.

August 02, 2020

Selenium Python Tutorial 13 | Framework | Selenium Python Page Object Model | Python selenium POM

Moving on to the next tutorial in the Selenium Python Tutorials for Beginners. It deals with Python Automation Testing with Selenium WebDriver Python. This Selenium Python beginner tutorial explains Selenium Python Page Object Model, also known as the POM framework. Not using the Selenium Python POM framework results in lower Python code readability and code duplicity. We can implement Python Selenium POM by creating separate Python files for the web page and the test logic. First, view the Selenium Python Page Object Model Tutorial Then read on.

Selenium Python POM implementation has the following steps:
  • Create separate directories for web pages and test cases. Optionally, create separate directories for browser drivers, logs and screenshots.
  • In the web pages directory, create a separate Python file for each web page. This Python file should contain the code for web page operations, web page locators and title etc.
  • In the test cases directory, create a separate Python file for each test case. This Python file should contain only the test logic, which consists of test steps and expected results' validations.
Here is my Selenium Python Page Object example. This is based on the Selenium Python example that I showed in the Selenium Python tutorial 1. I created the directories Test_Cases and Pages by right clicking the project in PyCharm IDE > New > Directory. Then, I created the Python files within the relevant directories by select the directory > right click > New > Python File. Within the Python code, I put explanations in the comments within the code (lines or phrases starting with #).

# Test_Cases>WikipediaTest1.py
# Selenium WebDriver Python coding
from selenium import webdriver
from Pages.MainPage import MainPage
from Pages.EnglishPage import EnglishPage
exec_path = r"E:\Training\SeleniumPython\Downloads\geckodriver-v0.26.0-win32\geckodriver.exe"
driver = webdriver.Firefox(executable_path=exec_path)
base_URL = "https://www.wikipedia.org"

def set_up():
    driver.get(base_URL)

# Test logic containing the test steps and expected results' validation
def test_main_page():
    mp = MainPage(driver)
    mp.test_title()
    mp.click_english_link()

# Test automation logic (test steps and expected results' validation)
def test_english_page():
    ep = EnglishPage(driver)
    ep.search_text()

set_up()
test_main_page()
test_english_page()

# Pages>MainPage.py
# Selenium WebDriver Python coding
from selenium.webdriver.common.by import By
# Import statements for Explicit Wait or WebDriverWait Python
from selenium.webdriver.support.ui import WebDriverWait as W
from selenium.webdriver.support import expected_conditions as E

class MainPage():
    # Put the title and web page locators.
    title = "Wikipedia"
    english_partial_link_text = "English"
    wait_time_out = 5 # for explicit wait

    # init method will be executed automatically when the MainPage object is created.
    def __init__(self, drv):
        self.drv = drv
        self.wait_variable = W(self.drv, self.wait_time_out)

    # Now, add methods for automation test logic.
    # test_title is a web page operation in the MainPage for expected result validation.
    def test_title(self):
        assert self.title in self.drv.title

    # click_english_link is also a web page operation in the MainPage.
    def click_english_link(self):
        self.wait_variable.until(E.element_to_be_clickable((By.PARTIAL_LINK_TEXT, self.english_partial_link_text))).click() 

# Pages>EnglishPage.py
# Selenium WebDriver Python coding 
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait as W
from selenium.webdriver.support import expected_conditions as E

class EnglishPage():
    # Put the web page locators and search term.
    search_id_locator = "searchInput"
    term = "Software"
    wait_time_out = 5 # for WebDriverWait Python

    # The class init method is also called the constructor.
    def __init__(self, drv):
        self.drv = drv
        self.wait_variable = W(self.drv, self.wait_time_out)

    # automation test logic
    def search_text(self):
        input_box_element = self.wait_variable.until(E.presence_of_element_located((By.ID, self.search_id_locator)))
        input_box_element.send_keys(self.term)
        input_box_element.submit()
        # Expected result validation
        self.wait_variable.until(E.title_contains(self.term))

Want to understand how the Python code above works? And how to implement logging and screenshots in the POM framework easily? Then please view my Selenium Python POM Tutorial. Thank you.