Appium – Mobile App Automation – Introduction

Appium (appium.io) is an open-source tool, used to automate mobile applications, IOS, Android and support windows and platforms like android, iOS, desktop, windows as well. It can be used to automate native, web and hybrid mobile applications. native- an application which is native to mobile OS like iOS or Android web - can run in mobile web browser hybrid- are native applications but still can be opened in a specific native container or browser. Appium uses selenium web driver library, and the client scripts can be written in multiple programming languages Java, python, C# ruby, PHP, JavaScript and robot framework. written in C# created in 2011 by Dan Cuellar under the name iOSAuto, 2012 made open source under Apache license. 2013- sauce labs agreed to support Appium development. Design of Appium: Appium uses selenium web driver script -> and using the web driver wire protocol (Json wire protocol) the client scripts are converted into http rest-based requests-> sends to Appium server-> Appium server runs the request-> and runs automation using the native automation framework on the mobile application in the mobile device. more info is int eh Appium documentation here https://appium.io/docs/en/about-appium/intro/ Install Apium in Windows, option we are going tose eis from node.js Check in command line node --v to check for the version of the node js  

image

 

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.

New Test Plan creation in Apache JMeter

Add necessary info on to the test plan creation.

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 Samplers

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

 

Notes:

  1. Create a test plan
    1. View results
      1. Results tree
      2. Results in table
    2. Assertion
    3. Timer
    4. Listener
    5. Thread Group
      1. Ramp up
      2. Ramp down
    6. Heap dump
    7. Enable Debug
    8. HTML Report Viewer
      1. Log Level
        1. Trace
    9. Start->Remote->Stop+All
    10. Test/Sampler-> FTP,HTTP, JDBC, API

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

  1. Setup test - in IDE
  2. Write test
  3. Run test
  4. View the results (Debugging, if required)

As of now, 5 Browsers are supported Chrome, Firefox, edge, electron, brave

Cypress Features:

  1. 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.
  2. 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..