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.


Monday, 4 April 2016

Java Basics Help


Data Types:
 
There are two data types available in Java:
  • Primitive Data Types
    There are eight primitive data types supported by Java. Primitive data types are predefined by the language and named by a keyword.

    byte,short,int,long,char,double,float,boolean
  • Reference/Object Data Types
    • Reference variables are created using defined constructors of the classes. They are used to access objects. These variables are declared to be of a specific type that cannot be changed. For example, Employee, Puppy etc.
    • Class objects, and various type of array variables come under reference data type.
    • Default value of any reference variable is null.
    • A reference variable can be used to refer to any object of the declared type or any compatible type.
Variables:

You must declare all variables before they can be used.
The basic form of a variable declaration is shown here:

data type variable [ = value][, variable [= value] ...] ;
 
Here data type is one of Java's datatypes and variable is the name of the variable. To declare more than one variable of the specified type, you can use a comma-separated list.

Following are valid examples of variable declaration and initialization in Java:

int a, b, c;         // Declares three ints, a, b, and c.
int a = 10, b = 10;  // Example of initialization
byte B = 22;         // initializes a byte type variable B.
double pi = 3.14159; // declares and assigns a value of PI.
char a = 'a';        // the char variable a iis initialized with value 'a' 

There are three kinds of variables in Java:
  • Local variables
  • Instance variables
  • Class/static variables
types of variable


Local Variable

A variable that is declared inside the method is called local variable.

Instance Variable

A variable that is declared inside the class but outside the method is called instance variable . It is not declared as static.

Static variable

A variable that is declared as static is called static variable. It cannot be local.


Monday, 15 February 2016

Eclipse Help

1. How to install ANDROID SDK

In Eclipse go to Help
Install New Software ---> Add
inside Add Repository write the Name: ADT (as you want)
and Location: https://dl-ssl.google.com/android/eclipse/
after loading some time you will get Developer Tools and NDK Plugins
check both if you want to use NDK in the future or check Developer Tool only
click Next
Finish

Sunday, 17 January 2016

Questions

1. What is difference between For loop and While loop ?
    
The while loop is usually used when you need to repeat something until a given condition is true:

inputInvalid = true;
while(inputInvalid)
{
    //ask user for input
    invalidInput = checkValidInput();
}


On the other hand, the for loop is usually used when you need to iterate a given number of times:

for(var i = 0; i < 100; i++)
{
    ...//do something for a 100 times.
}

Thursday, 18 December 2014

Android Terminologies: Rooting, Linux Kernel, Recovery mode

Rooting (Android OS)


Rooting is the process of allowing users of smartphones, tablets and other devices running the Android mobile operating system to attain privileged control (known as "root access") within Android's sub-system.

Rooting is often performed with the goal of overcoming limitations that carriers and hardware manufacturers put on some devices. Thus, rooting gives the ability (or permission) to alter or replace system applications and settings, run specialized apps that require administrator-level permissions, or perform other operations that are otherwise inaccessible to a normal Android user. On Android, rooting can also facilitate the complete removal and replacement of the device's operating system, usually with a more recent release of its current operating system.

As Android derives from the Linux kernel, rooting an Android device gives similar access administrative permissions as on Linux or any other Unix-like operating system such as FreeBSD or OS X.

Advantages of rooting include the possibility for complete control over the look and feel of the device. As a superuser has access to the device's system files, all aspects of the operating system can be customized with the only real limitation being the level of coding expertise. Immediately expectable advantages of rooted devices include the following:
  • Full theming capabilities, meaning that everything can be changed and themed from the color of the battery indicator, to the look of the dialer or contact list, to the video that plays while the device boots up.
  • Full control of the CPU and kernel, which should only be adjusted by knowledgeable users.
  • Full application control including the ability to backup, restore, or batch edit applications, or to remove bloatware that comes pre-loaded on many phones. These features become available with the use of root applications such as Rom Toolbox or Titanium Backup which are among the most popular root applications.

Android Rooting: Pros

If you root your android smartphone, you will get the following features.
  • It allows you to set up wireless tethering even though it has been disabled by default.
  • You can easily access the whole file system.
  • You can easily install the apps that requires root privileges.
  • It helps you to flash the custom ROM in your device.
  • It increase the tablet or phone’s performance.
  • It will allow you to add the extra features to your device.
  • It will provide an easy way for you to accept or deny the application permissions.
Apart from the above mentioned features, many apps allows you to automatically backup all your data’s when you root your device. For example: Some applications will let you to automatically backup all your data, block the advertisements completely, create secure connections to the internet and make your device a wireless hotspot.

Android Rooting: Cons

1. Voids the device warranty:
Once you root your device the first thing it will do is, void your device warranty. But don’t worry as you can unroot your device back by flashing the original backup ROM and reclaim the warranty.
2. Brick your device:
Whenever you root the device, you are taking the risk of bricking your phone. This is why everyone hesitates to root their phone. You can avoid this by following the right instructions and guidelines. You are not supposed to attempt the instructions unless you know what it does mean. Before trying to root the device ensure that the instructions are specifically for your phone model and manufacturer. Because it obviously vary for every devices.
3. Security risks:
The Android Rooting process may create security risks. It depends on what apps or services you are using on your device.

Prerequisites For Rooting:


  1. Before starting to root your android phone, make sure that the source you are having is really worthy and specifically created for your device model. Better ask suggestion to the other via online. If others state that the tutorial works without errors, then you too try it in your device.
  2. Before starting the rooting process, take backup all your data’s completely because after rooting you may lose your data’s. So, it is advisable to be on a safer side.
  3. Once you backup your data’s, charge your device fully so that it never turned off in between the process.
  4. Next ensure that the USB Debugging is ON in your device.
  5. Most of the rooting methods require you to install some software on the computer. For that you need to install android SDK or some other software. So, follow the given instructions properly and install it correctly.

Linux kernel

The Linux kernel is a Unix-like computer operating system kernel. The Linux kernel is the most widely used operating system kernel in the world; the Linux operating system is based on it and deployed on both traditional computer systems, usually in the form of Linux distributions,[8] and on embedded devices such as routers. The Android operating system for tablet computers and smartphones is also based atop the Linux kernel.

Kernel (operating system)

Image result for operating system kernel In computing, the kernel is a computer program that manages input/output requests from software, and translates them into data processing instructions for the central processing unit and other electronic components of a computer. The kernel is a fundamental part of a modern computer's operating system.
   

 

 

How to use recovery mode to fix your Android phone or tablet

How to boot into recovery mode on a Google Nexus device

If you have a device like the Nexus 5 or Nexus 7 running stock Android then these are the steps required to boot into Recovery mode:
  1. Hold down the Power key and select Power off. If the touchscreen is unresponsive then you can simply keep holding down the Power key for several seconds until the device turns off.
  2. Press and hold the Power key and the Volume down key. You should see the Android mascot on his back, a bunch of information about your device, and Start at the top right of the screen.
  3. To navigate through the menu options you use the Volume up and Volume down keys. The Power key is used to make a selection. Press Volume down twice and you should see Recovery mode in red up at the top right, press the Power key to select it.
  4. The white Google logo will pop up followed by the Android mascot on his back again with the words No command underneath.
  5. Press and hold the Power key and the Volume up key for around three seconds and then let go of the Volume up key, but keep pressing Power.
  6. You should see the Android system recovery options pop up at the top of the screen. Use the Volume keys to highlight the options and the Power key to select the one you want.
 http://www.digitaltrends.com/mobile/use-recovery-mode-android/

 





















Tuesday, 9 September 2014

Performance Testing Basics




Throughput is calculated as requests/unit of time. The time is calculated from the start of the first sample to the end of the last sample. This includes any intervals between samples, as it is supposed to represent the load on the server.
The formula is: Throughput = (number of requests) / (total time).

Elapsed time . JMeter measures the elapsed time from just before sending the request to just after the last response has been received. JMeter does not include the time needed to render the response, nor does JMeter process any client code, for example Javascript.

Latency . JMeter measures the latency from just before sending the request to just after the first response has been received. Thus the time includes all the processing needed to assemble the request as well as assembling the first part of the response, which in general will be longer than one byte. Protocol analysers (such as Wireshark) measure the time when bytes are actually sent/received over the interface. The JMeter time should be closer to that which is experienced by a browser or other application client.

Median is a number which divides the samples into two equal halves. Half of the samples are smaller than the median, and half are larger. [Some samples may equal the median.] This is a standard statistical measure. See, for example: Median entry at Wikipedia. The Median is the same as the 50 th Percentile

90% Line (90 th Percentile) is the value below which 90% of the samples fall. The remaining samples too at least as long as the value. This is a standard statistical measure. See, for example: Percentile entry at Wikipedia.

Standard Deviation is a measure of the variability of a data set. This is a standard statistical measure. See, for example: Standard Deviation entry at Wikipedia. JMeter calculates the population standard deviation (e.g. STDEVP function in spreadheets), not the sample standard deviation (e.g. STDEV).

Reference:
http://jmeter.apache.org/usermanual/glossary.html

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