Wednesday 20 July 2016

MySQL


1. DDL
Data Defination Launguage

CREATE
     -To Create database and its objects like table/index/view/store procedure/function/triggers

ALTER
    -Alters the structure of existing database

DROP
     -Delete the object from database


TRUNCATE
     - Removes all records from tables

COMMENT
   - Add comment to data disctionary

RENAME
  -Rename and object

2. DML
Data Manipulation Language

SELECT
-Retrieve date from  database

INSERT
-Insert data into table

UPDATE
-Update existing data within table


DELETE
-Delete all records from database table

3.DCL
Data Control Language

GRANT
-Allow user access privileges to  databases

REVOKE
-Withdraw user access privileges given by using GRANT command

4.DQL
Data Query Language

SELECT
SHOW
HELP

5.DTL
Data Transaction Launguage

START TRANSACTIONS, SAVEPOINT  COMMIT, ROLLBACK


 

API Automation Testing

What is an API?
a set of functions and procedures that allow the creation of applications

API is an acronym for Application Programming Interface.
It enables communication and data exchange between two separate software systems

HTTP Methods
GET     -Requests data from a specified resource
POST    -Submits data to be processed to a specified resource
HEAD    -Same as GET but returns only HTTP headers and no document body
PUT    -Uploads a representation of the specified URI
DELETE  -Deletes the specified resource
OPTIONS -Returns the HTTP methods that the server supports
CONNECT -Converts the request connection to a transparent TCP/IP tunnel

Swagger is a simple yet powerful representation of your RESTful API

Test Cases for API Testing:
Return value based on input condition:
Does not return anything:  
Trigger some other API/event/interrupt:
Update data structure:
Modify certain resources:


What is JSON ?
    JSON stands for JavaScript Object Notation
    JSON is a lightweight data-interchange format
    JSON is language independent *
    JSON is "self-describing" and easy to understand


JSON Syntax Rules
JSON syntax is derived from JavaScript object notation syntax:

    Data is in name/value pairs
    Data is separated by commas
    Curly braces hold objects
    Square brackets hold arrays

JSON Values
    A number (integer or floating point)
    A string (in double quotes)
    A Boolean (true or false)
    An array (in square brackets)
    An object (in curly braces)
    null

Example:
"employees":[
    {"firstName":"John", "lastName":"Doe"},
    {"firstName":"Anna", "lastName":"Smith"},
    {"firstName":"Peter","lastName":"Jones"}
]
====================================================================

Advantage of API Testing
-Testing core functionality
-Time Effective / Quick Response time
-Language Independent
-Easy Integration with GUI


API Testing Tools:
PostMan
RestLet Client
SOAP UI

REST:

-Representational State Transfer
-Its not protocol

XML, JSON,

What is Rest-Assured:

-is an pen Source Java Domain-Specific Language [DSL]
-Supports both XML & JSON
-Can eliminate large amount of code to test complex API Response and output

REST-Assured Support other Request
-POST -GET
-PUT-
-DELETE
-OPTIONS
-PATCH
-HEAD

*Only GET will give us data
*Other will make changes to server

http://rest-assured.io/

1.Creare Simple Maven Project
2.Add in pom.xml
<dependency>
  <groupId>io.rest-assured</groupId>
  <artifactId>rest-assured</artifactId>
  <version>${rest-assured.version}</version>
</dependency>
https://mvnrepository.com/artifact/io.rest-assured/rest-assured/

2.Add package
3. Add class

Paste this code
public class getData { @Test public void testResponseCode() { Response resp =RestAssured.get("http://samples.openweathermap.org/data/2.5/weather?q=London,uk&appid=b6907d289e10d714a6e88b30761fae22"); int code =resp.getStatusCode(); System.out.println("Status Code is: " +code); Assert.assertEquals(code , 200); } }

Oputput



Open API Example:

1. https://openweathermap.org/
- Sign In to get API Key
-here we will get JSON Data exmple

2. http://parabank.parasoft.com/parabank/services/bank/customers/12212
here we will get xml data

to try Postman
https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en

Select GET and paste
http://samples.openweathermap.org/data/2.5/weather?q=London,uk&appid=b6907d289e10d714a6e88b30761fae22






Monday 18 July 2016

Networking Basics for Software Tester



Define Network?
-----A network is a set of devices connected by physical media links. A network is recursively is a connection of two or more nodes by a physical link or two or more networks connected by one or more nodes.

Define Bandwidth and Latency?
------Network performance is measured in Bandwidth (throughput) and Latency (Delay). Bandwidth of a network is given by the number of bits that can be transmitted over the network in a certain period of time. Latency corresponds to how long it t5akes a message to travel from one end off a network to the other. It is strictly measured in terms of time.

 What is a gateway or Router?

-----A node that is connected to two or more networks is commonly called as router or Gateway. It generally forwards message from one network to another.

Define Routing
  ---- The process of determining systematically hoe to forward messages toward the destination nodes based on its address is called routing

Switches are used to connect multiple devices on the same network within a building or campus. For example, a switch can connect your computers, printers and servers, creating a network of shared resources. 

Routers, the second valuable component of your networking basics, are used to tie multiple networks together. For example, you would use a router to connect your networked computers to the Internet and thereby share an Internet connection among many users.

What is the communication protocol?
In telecommunications, a communications protocol is a system of rules that allow two or more entities of a communications system to transmit information via any kind of variation of a physical quantity.

Sunday 17 July 2016

Cloud Computing



What is it?

The practice of using a network of remote servers hosted on the Internet to store, manage, and process data, rather than a local server or a personal computer.

the ideologies and principles of cloud computing – “On demand availability”, “As a service” and “Pay for the usage”.  


Which are Models  in it?

Infrastructure as a Service (IaaS)
This is the most fundamental layer which forms the building block of the cloud. It mainly comprises of physical resources such as Storage, Network devices, compute servers, etc. All these computing resources are available on demand, where a user pays as per his usage.

Platform as a Service (PaaS)
The central layer in the cloud Is the platform. Here there is no control over the underlying infrastructure but you can access the deployed applications. Hence this provides the entire runtime environment on demand which could be a development or test environment. Hence in this model, most commonly you would have a VM that contains the complete environment like OS, required middleware, etc. available when you need it.


Software as a Service (SaaS) 

The topmost layer here is the application layer, which is generally visible to any user. Here, applications / products are available to the user on demand via the internet. Hence instead of having to acquire licenses for a particular user, this proves to be the most cost effective way of making sure that the license is always in use. Examples of this are Gmail, Google docs, Photoshop, etc.


Types of Clouds

  1. Private Cloud: Herecomputing resources are deployed for one particular organization.  This method is more used for intra-business interactions.  Where the computing resources can be governed, owned and operated by the same organization.
  2. Community Cloud: Herecomputing resources are provided for a community and organizations. 
  3. Public Cloud: This type of cloud is used usually for B2C (Business to Consumer) type interactions.  Here the computing resource is owned, governed and operated by government, an academic or business organization. 
  4. Hybrid Cloud: This type of cloud can be used for both type of interactions -  B2B (Business to Business) or B2C ( Business to Consumer). This deployment method is called hybrid cloud as the computing resources are bound together by different clouds.

Tuesday 12 July 2016

Advance Selenium

Advance Selenium


Advance Selenium Reporting
     -   Default report in Selenium using TestNG
     -   Generate XSLT report via ANT
     -   Advance Selenium report with Screenshot part 1             
     -   Advanced Selenium report  with screenshot part 2

Features of Extent Report

  • Allow is to generate logs inside HTML.
  • Generate PIE Chart based on test case status.
  • Generate Step summary.
  • We can filter reports depends on status.
  • It provides execution history.
  • It fetches system details like OS, Java Version, and Memory and so on.
  • Allow us the attach screenshot in report that is most important feature.


MobileAutomation - Handle Pop-ups, Alerts and Prompts in Automate and App Automate Tests

This article shows you how to handle user permission pop-ups, alerts, and prompts in your automated tests on BrowserStack. Introductio...