Category: Automation
Postman – API Automation – Introduction
Appium – Mobile App Automation – Introduction
If not available, download the node.js from the official website, Download | Node.js (nodejs.org)
now in command prompt type node -v or npm -v for checking on the versions of node and npm(node package manager)
The node and npm is installed successfully in the machine.
to see the location of the installed npm and node
npm where
node where
install appium
npm install -g appium
To verify Appium installation
appium --version or appium -v
to start appium just type in the command prompt as appium
to stop ctrl+c and the appium server will shutdown
Install appium with appium desktop client based ont eh OS u are using select the necessary package and install.
To start the server, click start
APPIUM Doctor -GitHub - appium/appium-doctor: Tool to verify appium installation
- is the next to be installed. npm install appium-doctor
to check if appium-doctor is installed, use appium-doctor --version
to check for android
appium-doctor --android
https://www.browserstack.com/guide/appium-with-python-for-app-testing
Apache JMeter Introduction – Basic tests
Apache JMeter is an Apache project used to in load test, to evaluate the performance of the applications. Let's get started in few simple steps in creating a simple test to understand the basic features of JMeter. Accessing JMeter -the package can be downloaded from the Apache JMeter - Download Apache JMeter website and extracted, saved in the preferred location from where it could be used. The necessary pre-requisite is provided on the website. Open the tool in windows OS by navigating to the path and double clicking the batch file, once the tool is opened Navigate to file->new->Test Plan add necessary info and save the file. Once the Test Plan is created, Right click on the test plan and create a thread Group defining the total number of users, ramp-up time, etc.. to be used in the test. Adding the users- ramping up and ramping down, here the users are10 and minutes to ramp-up (steadily increase the user count/simulation to do the similar actions) in the 20 seconds.
Adding listeners to see the results, here we are seeing 2 listeners View results tree and View Results in table, once the test plan is run the below information can be seen. View Results Tree View Results in Table
New Test Plan creation in Apache JMeter
Adding Samplers
Notes:
- Create a test plan
- View results
- Results tree
- Results in table
- Assertion
- Timer
- Listener
- Thread Group
- Ramp up
- Ramp down
- Heap dump
- Enable Debug
- HTML Report Viewer
- Log Level
- Trace
- Log Level
- Start->Remote->Stop+All
- Test/Sampler-> FTP,HTTP, JDBC, API
- View results
Python – Automation – P1- Install robotframework
Robot framework.org - python based framework - keyword driven approach!
Ex:
open browser url chrome
input text id text info
Close Browser
install on windows OS
1.As a pre-requisite python must be installed in the system you are going to create the automation scripts, once its installed
need to check if pip is available
2. pip install robotframework
3. pip install --upgrade robotframework
4. pip install robotframework==5.0.1
to check if the robot framework is correctly installed, please follow the below commands!
pip freeze
pip list
pip show robotframework
pip check robotframework
If you want to uninstall Robot framework
To check on the version of the Robot framework
robot --version
Set environment variables in the PATH, so python is accessible from across locations in the system from where the code/file is being saved.
Java – Selenium – Web Automation Introduction
Selenium can be considered either as API or a framework, a tool to automate web applications. It is open source and can be programmed in multiple high-level languages.
Ex: Python, Java, C#, etc...
Here, we are going to see the usage of the tool in Java. A foundation level of understanding of the core concepts and object-oriented programming is necessary.
To validate the UI scenarios using Java and Selenium, one can use the jQuery website to practice with the latest UI level usage across the website.
Cypress javascript automation tool an introduction
Cypress is a test automation tool for web applications. With scripts written in JavaScript, there are many built in commands available.
Even though the tool can be used by using only JavaScript, one can use type script can be used.
Note: Cypress does not use selenium - it interacts with browser directly and is fast
Oen Source and free to use for most of the features - Dashboard (optional pricing)
There are 4 steps in Cypress one must know to start with
- Setup test - in IDE
- Write test
- Run test
- View the results (Debugging, if required)
As of now, 5 Browsers are supported Chrome, Firefox, edge, electron, brave
Cypress Features:
- Time Travel- snapshot is taken for every command - the screenshots can be seen from the command logs
state of the application before and after the command are recorded. - Automatic Waits- For assertions - automatic waits are added by cypress - if required one can add extra wait time for a specific step.
Pre-Requisite to install and use Cypress can be seen below:
OS: Windows 7 and >, Mac 10.9 and > (64 bit), Linux (ubuntu 12.4 and >, Fedora21, Debian 8(64 bit)
Before installing node, check whether node is already installed in the system,
node -v or node --version to see the version of the node .js app
If not available, download the node.js from the official website, Download | Node.js (nodejs.org)
now in command prompt type node -v or npm -v for checking on the versions of node and npm(node package manager)
The node and npm is installed successfully in the machine.
https://www.cypress.io/blog/2022/03/28/real-world-testing-with-cypress/
https://www.youtube.com/watch?v=Gu9KdbpzSvk&list=PL6flErFppaj2TYXXee5Zt_rR_RpOTBfm1
API-Automation
Here we are going to see the simplest and easiest steps about the validation of API thru automation in java using REST Assured, Junit5, MySQL
Basic knowledge on Java, Xampp, MYSQL, Maven, Junit
API-
API Request has the 4 basic info required
End point - the url where the action to be made is provided here
method - action to be made as get, post, put, delete on the url provided
header - authorization cred required to make the request and format of how we receive the response, html, json, txt etc..
data- additional information for the api in order to fulfill the request- data - also called as payload- can be given in body or in query parameters too!
REST Assured -
Uses Given, when and then approach to process the requests
to be updated..