Thursday, October 22, 2020

Another fun cases to automate in Wordpress

 TC1: Validate all plans in plan and pricing page

  • Go to plan and pricing page
  • Validate availability of Personal plan
  • Validate availability of Premium plan
  • Validate availability of Business plan
  • Validate availability of eCommerce plan
  • Validate availability of Configure plan

TC2: Validate login functionality
  • Go to login page
  • Read username and password from a text file
  • Enter username and password
  • Validate successful login attempt

TC3: Validate logout functionality
  • Go to profile page
  • Try to logout 
  • Validate successful logout attempt

tfw_play.robot (Robot test suite file)
  • Add resource files
  • Configure suite setup and teardown
  • Perform TC1, TC2 and TC3

tfw_initial.robot (Robot resource file)
  • Provide site URL
  • Open browser
  • Set selenium times
  • Maximize window size

tfw_header_bar.robot (Robot resource file)
  • Get all locators
  • Navigate menu links

tfw_plan_price_page.robot (Robot resource file)
  • Get all plan type locators
  • Validate presence of different types of plans in the page

tfw_login_page.robot (Robot resource file)
  • Get all locators
  • Read username and password from text files
  • Provide username and password and try to login

tfw_loggedin_page.robot (Robot resource file)
  • Get locators
  • Verify successful login attempt
  • Try to logout

tfw_loggedout_page.robot (Robot resource file)
  • Get locators
  • Verify successful logout attempt

user_name.txt (Text file to read)
  • Provide username

user_password.txt (Text file to read)
  • Provide password

Git repository link: https://github.com/wasiqul

Wednesday, October 21, 2020

A fun case to automate cont.

A few month earlier I wrote an automation script in Robot framework which will go to bongobd and navigate to a specific section and play a video. Few days ago I tried to run it and found out it is failing. Upon further investigation I realize the whole section is removed from the site thus the locator is not able to find it and the whole case is failing. I decide to fix it to run it again.

When I was fixing it I feel the need to validate all category pages first so that I can find it in advance if any sections are missing or updated. Then search for the same video and play it. While updating I feel the need to redesign the code for the ease of maintenance, reusability and better understanding. So I decided to go for page object modelling (POM).

In order to design it in POM first I investigate which parts of the website is remaining the same across all pages so I can model them as page objects. Find out header navigation bar and footer are always remaining the same. So, created headerBar.robot and footer.robot objects.

After that as I am interacting with the search result page, I created another object called searchResult.robot and all my test cases were listed in bongo.robot like before. And also make sure that all validations are done here and no where else.

Project was running fine and notice that some actions need to taken at start and writing those action in test case file does not feel right to me. So, I created another object called initial.robot and call it upon setup. And put all locators and inputs in variable so future updates will be easy.

I know that there is still room for improvement but still I am satisfied with all changes I have done. I think it is much more maintainable and reusable than before.

Here is the git hub repository link,

github.com/wasiqul/robotframework_bongobd

Wednesday, July 22, 2020

What is testing? And how I test?

Akash Saha (Software QA professional) : 


In My opinion, when a person checks the usability,functionalities and components of a product before or after using it can be referred as testing. 

I always check if the product has the utilizable features for using it without any kind complications. If the outcome is not satisfactory users will not accept it positively. So,assuring the grade and quality as per requirements is my main goal in the process of testing. 


Shounak Banik (Software QA professional):


From my point of view, testing is to find out the progress of the execution of different components of a system. 

Firstly, I gather knowledge regarding feature which I am going to be tested. Secondly, I make strategy so that any of patterns of testing the feature will not be missed. Lastly, I start testing according to the checkpoints/ strategies those I make for testing. 


Wasiqul Huq (Software QA professional): 


Testing is learning with an objective. The objective can vary depending upon goal. Sometime we test to validate, sometime we test to choose, sometime we test to take a decision. 

I conduct experiments with test environment, test data and test cases. My experiment results guide me towards my objective. If my objective is to validate than I validate against requirement or industry standards. If my objective is to choose one solution among others than i compare and choose which will fit my purpose. If my objective is to take decision than I write down case details so I and others can judge my decision taken.


Saika Shahnaj (Software QA professional): 


I think testing is the combination of some process and steps that a tester need to follow to ensure a flawless system which meets the business and system requirements to fulfill clients’ satisfaction. 

When I test any system or specific module, at the very first I try to go through the requirements and understand each of the words. Then prepare a list of test cases that I can follow for a complete testing. The team discussion also helps a lot to resolves the confusions during test run.


Imran Khaled (Software QA professional): 


To me testing is setting up a standard which a client urges the most.

First of all, when I am assigned a feature or module to test I go through the documentation to understand the requirements. Then I plan out the testing in a way so that it meets all the requirements mentioned in the documentation. After planning I discuss the plan with manager to make sure I am not missing out on any scope of the documentation. This is the process of testing I go through while testing a module.

Sunday, February 2, 2020

A fun case to automate

Github repository link: https://github.com/wasiqul/robotframework_bongobd

Test Case Descritions: User will click the free content,load the content & play it

Detail steps,
Step 1: Open the Chrome browser
Step 2: Go to https://www.bongobd.com
Step 3: Click on Classic
Step 4: Scroll till Most Watched section
Step 5: Click on Ontore Ontore film link
Step 6: Watch advertisement
Step 7: Play the movie
Step 8: Watch the movie for first 1 minute
Step 9: Close the browser

Expected result: The script that automates the flow should work without any errors


Different types of Asserts in Robot Framework

1. Builtin library:
http://robotframework.org/robotframework/latest/libraries/BuiltIn.html
2. Selenium library:
https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html
3. Collections library:
http://robotframework.org/robotframework/latest/libraries/Collections.html

Monday, January 27, 2020

Different types of Waits in Robot Framework (Selenium Library)

1. Sleep
Waits for a specific given time.

2. Set Selenium Speed
Waits given specific time before each Selenium actions performed.

3. Set Selenium Timeout
Waits given specific time before throwing exception for each Selenium Waits.


4. Set Selenium Implicit Wait
Waits given specific time before throwing exception for each Selenium action's locator not found (only when locator is not found, if found it will wait default time).

Sunday, January 19, 2020

Configure Continuous Integration System Jenkins to build Robot projects

1. Download Jenkins

Go to https://jenkins.io/download/ and download it for your system.

2. Start and Setup Jenkins in you system

After download open command line window.

Write from command line
cd location_of_jenkins.war_file

Write from command line to run Jenkins in 8080 port
java -jar jenkins.war

Write from command line to run Jenkins in a specific port
java -jar jenkins.war --httpPort=port_number

Output will show Jenkins running status.

From browser, browse to localhost:specific_port_number (if specific port is given otherwise only localhost which will select port 8080 by default).

3. Add plugins and start

When Jenkins start select plugins and setup them after that restart Jenkins. Make sure Robot Framework plugin is installed.

4. Create and configure a new job in Jenkins

Select a Freestyle project and click on OK button. Enter Description from General tab. Select Git in Source Code Management tab, provide Repository URL and test it. In Build tab select Execute Windows batch command if you are running in Windows. Provide commands in Command box and Save it.

Windows batch command
robot_project_folder_location_drive:
cd robot_project_folder_location
robot -t test_name test_suite_name
echo BuildCompleted

5. Build - Robot Framework

From Jenkins project, select Build Now from drop down list, automation script should run when Robot project is building. Also robot reports should be available after successful build.

6. Robot Framework Reports

From Jenkins project configuration and navigate to Post Build Actions tab, click on Add post-build action button drop down list select Publish Robot Framework test results. Than provide location of robot test results file location in Directory of Robot Framework test results field and Save it. Build again to validate robot test results.

7. To overcome Opening Robot Framework report failed error in HTML reports

Search for Jenkins security policy. Go to JENKINS wiki/Configuring Content Security Policy navigate to Implementation section and copy code given in Unset the header: section. Than move to Jenkins > Manage Jenkins > Script Console > Paste copied code and click on Run button. If Result shown below than it is successful. Build again and click on robot results html links and observe that instead of error reports are shown.

Configure Version Control System Git in Eclipse for Robot projects

1. Create an account in Github

Go to https://github.com/ signup for an account. If you already have account than sign in.

2. Sign in and create a new repository

Create a new repository for your Robot project and remember the repository URI.

3. Git Perspective in Eclipse

Open Eclipse and navigate to Window -> Open Perspective -> Git.

4. Clone Repository in Eclipse

From Git Repository select Clone Repository, provide git repository URI and credential information in Source Repository window. Specify Branch and save it.

5. Share Project in Eclipse

In Eclipse, navigate to Project > Team > Share Project and share newly added repository.

6. Commit and Push from Eclipse

In Eclipse from Git Perspective select files for Staging, provide commit message and click on Commit and Push button.

Monday, December 30, 2019

Install Java, Eclipse and RED

1. Check if Java already installed in the system

Write from command line
java -version

Output will show java installed version. If not installed than will show 'java' not recognized as internal or external command.

Check for java compiler version if Java is installed. Write from command line
    javac -version

Output will show installed Java Compiler version.

2. If Java not installed than download and install it

Go to https://www.oracle.com/technetwork/java/javase/downloads/index.html download it. Click Install now after successfully download the exe file to install it.

3. Setting Environment Variable

Navigate to My computer -> Properties-> Advance System Settings-> Environment Variable-> search for Path in System variable and click on Edit, add java/jdk/bin location and Save it.

4. Check installed Java

Write from command line
java -version

Output will show java installed version.

Write from command line
javac -version

Output will show java compiler installed version.

5. Download Eclipse

Go to https://www.eclipse.org/downloads/ and download Eclipse IDE.

6. Install Eclipse

Click Install now after successfully download the exe file. Select Eclipse IDE for Java developers.

7. Install RED - Robot Framework

Go to Eclipse marketplace and search for RED - Robot Framework and add it to your Eclipse IDE.

Install Robot Framework

1. Check prerequisite of Robot Framework

Write from command line
    python --version

Output showed installed python version.

Write from command line
    pip --version

Output showed installed pip version.


2. Install Robot Framework

Go to https://robotframework.org/ and read instructions.

Write from command line
pip install robotframework

It will download and install Robot Framework.


If required to uninstall already installed Robot Framework.

Write from command line
pip uninstall robotframework


If reinstalled right after uninstalling it than it will be installed from cache library.

To install a fresh copy write from command line
pip install --no-cache-dir robotframework


In order to upgrade installed Robot Framework, write from command line
pip install --upgrade robotframework


In order to install a specific version of Robot Framework, write from command line
pip install robotframework==2.9.2


3. Check installed Robot Framework

Write from command line
pip freeze

Output will show all python library installed list.

Write from command line
pip list

Output will show all python library installed list in a tabular form.

Write from command line
pip show robotframework

Output will show Robot Framework details.

Write from command line
pip check robotframework

Output will show Robot Framework requirement status.