This document provides an introduction to the Java programming language. It discusses Java's platform and environment including the JVM, JRE, and JDK. It also covers Java programming basics like data types, operators, control flow, classes and objects, methods, constructors and inheritance. The document explains key Java concepts like abstraction, encapsulation, polymorphism and interfaces. It also discusses arrays, access modifiers and the 'super' keyword in Java.
Network Protocol Testing Using Robot FrameworkPayal Jain
The slides describes how Robot Framework provides synergy in test automation, making a lot of
automation processes flexible and simple for testing network protocols(in this case BGP).
This presentation demonstrates general guidelines how to create good test cases using Robot Framework. Both good practices and anti-patterns are presented.
The presentation is hosted on GitHub where you can find the original in ODP format: https://github.com/robotframework/DosDontsSlides
Brief introduction to Test Automation Frameworks, Acceptance Testing and ATTD using Testerone – custom made solution based on RobotFramework and it’s extensive libraries for Selenium’s and AutoIT’s support.
Bring the test cases closer to business people, leave the technical stuff to technical staff using simple business-to-tech excel sheet (map) for collaboration. Complete the solution by controlling everything using Jenkins CI server.
Network Protocol Testing Using Robot FrameworkPayal Jain
The slides describes how Robot Framework provides synergy in test automation, making a lot of
automation processes flexible and simple for testing network protocols(in this case BGP).
This presentation demonstrates general guidelines how to create good test cases using Robot Framework. Both good practices and anti-patterns are presented.
The presentation is hosted on GitHub where you can find the original in ODP format: https://github.com/robotframework/DosDontsSlides
Brief introduction to Test Automation Frameworks, Acceptance Testing and ATTD using Testerone – custom made solution based on RobotFramework and it’s extensive libraries for Selenium’s and AutoIT’s support.
Bring the test cases closer to business people, leave the technical stuff to technical staff using simple business-to-tech excel sheet (map) for collaboration. Complete the solution by controlling everything using Jenkins CI server.
Software Testing - Tool support for testing (CAST) - Mazenet SolutionMazenetsolution
Topics: Types of CAST tool, Why capture/ replay is not test automation, Automating and testing are seperate skills best practise.
To know more about
Offer- http://mazenet-chennai.in/mazenet-offers.html
Syllabus- http://www.mazenet-chennai.in/software-testing-training-in-chennai.html
Slide share: http://www.slideshare.net/mazenet_solution/presentations
For more events- http://mazenet-chennai.in/mazenet-events.html
All videos- https://www.youtube.com/c/Mazenetsolution
Facebook- https://www.facebook.com/Mazenet.IT.Solution/
Twitter- https://twitter.com/Maze_net
Mail us : marketing@mazenetsolution.com
Contact: 9629728714
This is a basic level robot framework presentation. You can install robot framework without any problem and start your first test with this presentation.
Many developers are on board with writing unit tests for their code. However a lot of developers don’t test as much as they should because deciding how and what to unit test is harder than deciding to test. Laravel 5 is built with great support for unit testing with PHPUnit but testing applications built using the Model View Controller pattern can prove challenging. This talk will cover ways to design your code to make testing easier and also help you decide what should be unit tested and what should be left to other testing methods.
Sphinx + robot framework = documentation as result of functional testingplewicki
Sphinx is a Python documentation generator, Robot Framework is a test automation framework. These tools combined make documentation a part of the test coverage. Tests are written in human (customer) readable form and the result documentation contains screenshots from product in development.
EasyTest Test Automation Tool IntroductionZhu Zhong
EasyTest is a general purpose automation test tool with cross platform capability. It was developed at Alcatel-Lucent and made free Nov. 2, 2012.
It provides an easy approach for users to quickly develop, automate and maintain automation scripts.
EasyTest's Network Element (NE) based services are especially suitable for operators, service providers and network equipment manufacturers to test their carrier grade systems.
EasyTest has been used in many technologies such as LTE, WCDMA, GSM, CDMA, NGN and IP. It is a freeware under license "easytest license“
If you’re responsible for creating diverse, scalable automated tests but don’t have the time, budget, or a skilled-enough team to create yet another custom test automation framework, then you need to know about Robot Framework!
In this webinar, Bryan Lamb (Founder, RobotFrameworkTutorial.com) and Chris Broesamle (Solutions Engineer, Sauce Labs) will reveal how you can use this powerful, free, open source, generic framework to create continuous automated regression tests for web, batch, API, or database testing. With the simplicity of Robot Framework, in conjunction with Sauce Labs, you can improve your test coverage and time to delivery of your applications.
This presentation is ideal for a beginner of Java or someone who wants to brush up their Java Knowledge. It's simple to understand and well organized in a way most of the area in core Java has been covered.
Software Testing - Tool support for testing (CAST) - Mazenet SolutionMazenetsolution
Topics: Types of CAST tool, Why capture/ replay is not test automation, Automating and testing are seperate skills best practise.
To know more about
Offer- http://mazenet-chennai.in/mazenet-offers.html
Syllabus- http://www.mazenet-chennai.in/software-testing-training-in-chennai.html
Slide share: http://www.slideshare.net/mazenet_solution/presentations
For more events- http://mazenet-chennai.in/mazenet-events.html
All videos- https://www.youtube.com/c/Mazenetsolution
Facebook- https://www.facebook.com/Mazenet.IT.Solution/
Twitter- https://twitter.com/Maze_net
Mail us : marketing@mazenetsolution.com
Contact: 9629728714
This is a basic level robot framework presentation. You can install robot framework without any problem and start your first test with this presentation.
Many developers are on board with writing unit tests for their code. However a lot of developers don’t test as much as they should because deciding how and what to unit test is harder than deciding to test. Laravel 5 is built with great support for unit testing with PHPUnit but testing applications built using the Model View Controller pattern can prove challenging. This talk will cover ways to design your code to make testing easier and also help you decide what should be unit tested and what should be left to other testing methods.
Sphinx + robot framework = documentation as result of functional testingplewicki
Sphinx is a Python documentation generator, Robot Framework is a test automation framework. These tools combined make documentation a part of the test coverage. Tests are written in human (customer) readable form and the result documentation contains screenshots from product in development.
EasyTest Test Automation Tool IntroductionZhu Zhong
EasyTest is a general purpose automation test tool with cross platform capability. It was developed at Alcatel-Lucent and made free Nov. 2, 2012.
It provides an easy approach for users to quickly develop, automate and maintain automation scripts.
EasyTest's Network Element (NE) based services are especially suitable for operators, service providers and network equipment manufacturers to test their carrier grade systems.
EasyTest has been used in many technologies such as LTE, WCDMA, GSM, CDMA, NGN and IP. It is a freeware under license "easytest license“
If you’re responsible for creating diverse, scalable automated tests but don’t have the time, budget, or a skilled-enough team to create yet another custom test automation framework, then you need to know about Robot Framework!
In this webinar, Bryan Lamb (Founder, RobotFrameworkTutorial.com) and Chris Broesamle (Solutions Engineer, Sauce Labs) will reveal how you can use this powerful, free, open source, generic framework to create continuous automated regression tests for web, batch, API, or database testing. With the simplicity of Robot Framework, in conjunction with Sauce Labs, you can improve your test coverage and time to delivery of your applications.
This presentation is ideal for a beginner of Java or someone who wants to brush up their Java Knowledge. It's simple to understand and well organized in a way most of the area in core Java has been covered.
This is a beginner-level programming session where you will learn the fundamentals of Java. Between each lesson, you'll have skill testing in the form of quizzes, as well as hands-on experience in the field.
Presented by: N.V.RajaSekhar Reddy
www.technolamp.co.in
Want more interesting...
Watch and Like us @ https://www.facebook.com/Technolamp.co.in
subscribe videos @ http://www.youtube.com/user/nvrajasekhar
Test automation within a scrum process. How test automation can be planned and executed in a scrum environment and some techniques to think beyond traditional automation.
More from Kushan Shalindra Amarasiri - Technical QE Specialist (12)
2. Introduction to Programming
Language
▪A programming language is a set of rules that provides a way
of telling a computer what operations to perform
▪Generally a computer program takes an input and process the
input to produce an output
Input Process Output
4. Understand Java platform
and environment
▪ JVM - Provides runtime
environment in which java
bytecode can be executed
▪ JRE - Provides runtime
environment. Implements
JVM
▪ JDK - Java Developer Kit
contains tools needed to
develop the Java programs,
and JRE to run the
programs.
Compiler
Debugger
Java
Applet
Viewer
JVM
rt.jar Java.exe
libraries
JRE
JDK
5. Programmed Translators
▪Some languages use both compiler and interpreter to do the translations
▪E.g. Java compiler translates a java program into a machine independent
intermediate language known as JVM machine language,
▪Then the code in the JVM machine language is interpreted using a java
interpreter
6. Features of Java
Simple
Syntax is based on C++
Not required to remove unreferenced objects since Automatic Garbage Collection
is there
Portable
Write Once Run Anywhere (WORA)
Object Oriented
Platform Independent
Java code is compiled by the compiler and converted into bytecode. This is
platform independent thus can be run on multiple platforms
▫ Multithreaded
With Java's multithreaded feature it is possible to write programs that can
perform many tasks simultaneously.
7. Prerequisites
For this you should have a basic knowledge of Object Oriented Principles (OOPs).
Let’s start with the basics
Object
A real world Entity which has a state and a
behavior
Class
A class is a collection of Objects. It serves as
a template for creating, or instantiating,
specific objects within a program.
E.g:- A Car class can have a model, color, manufacturedYear as
state and drive, reverse as behaviours. Ferrari is a real world
Object that we can create from that class
8. Fundamentals of OOP
▪ Abstraction – Hiding Internal details and showing only the functionality
Abstract classes, Interfaces are ways of achieving this
▪ Encapsulation – Binding and wrapping code and data together
Java class (having private fields and public accessors,mutators) are an
example for this
▪ Polymorphism – One task is performed in different ways
Method overriding and overloading are ways to achieve this
▪ Inheritance – One object acquires all the propertiese and behaviours of a parent
object
- Inheritance provides code reusability and used to achieve runtime polymorphism
- Java doesn’t allow multiple inheritance
9. Abstraction
▪ Animals are capable of doing different things like flying, digging and
walking, but there are some common operations as well like eating
and sleeping.
▪ Some common operations are performed by all animals, but in a
different way as well.
▪ When an operation is performed in a different way, it is a good
candidate for an abstract method
10. Encapsulation
To achieve encapsulation in Java
•Declare the variables of a class as private.
•Provide public setter and getter methods to modify and
view the variables values.
11. Inheritance
extends is the keyword used to
inherit the properties of a class.
Following is the syntax of extends
keyword.
12. Basic Structure of a Java
program
public class HelloWorld{
public static void main(String[] args){
System.out.println(“Hello World”);
}
}
Access modifier Class name Method name
Argument
list(expects an
array of String
arguments)
13. Few important keywords in
Java
▪ Variable - A Java variable is a piece of memory that can contain a data
value. A variable thus has a data type.
▪ Data Type – They further explain the kind of data that needs to be stored
e.g :- int, char
▪ Literals – Source code representation of a fixed value
e.g :- int age=20;
▪ Default Values – If variables are not assigned with a value then compiler
will add a value automatically
e.g :- default value for String is null, default value for boolean is false
Identifiers – Name of the variable
Keywords – Reserved words in java
14. ▪ short
▪ byte
▪ int
▪ long
▪ double
▪ float
▪ char
▪ boolean
Basic Data Types in Java
Data Types
Primitive Data Types Reference Data Types
▪ Objects such as String,
Array, HashMap etc.
▪ Default value is null
▪ Reference can be used to
access the object
integer types
floating points
18. Decision making in java
If
e.g:-
if(num%2 ==0){
//print even
}
If-else
e.g:-
if(num%2 ==0){
//print even
}
else{
//print odd
}
If- else if - else
e.g:-
if(num%2 ==0){
//print even
}
else if(num%2 !=0){
//print odd
}
else{
//print invalid input
}
switch
e.g:-
char grade=‘A’;
switch(g){
case ‘A’ : //print ‘Pass’
break;
case ‘F’ : //print ‘Fail’
break;
default: //print ‘Invalid’
}
19. Loops in Java
while
e.g:-
int x=0;
while(x<words.length){
//print words[x]
x++;
}
do-while
e.g:-
int x=0;
do{
//print words[x]
x++;
} while(x<words.length);
for
e.g:-
for(int x=0 ; x<words.length ; x++){
//print words[x]
}
foreach
e.g:-
for(String word : words){
//print word
}
String words[]={“apple” , “banana”, “grapes”};
20. Break and Continue
keywords in Java
Break
e.g:-
int x=0;
while(x<words.length){
if(words[x].equals(“banana”)){
break;
}
else{
System.out.println(words[x]);
}
x++;
}
Continue
e.g:-
int x=0;
while(x<words.length){
if(words[x].equals(“banana”)){
continue;
}
else{
System.out.println(words[x]);
}
x++;
}
String words[]={“apple” , “banana”, “grapes”};
apple apple
grapes
OUT
21. Conditions and loops
if/else
do/while
for
Switch case
If(x==4) {
// act1
} else {
// act2
}
int i=5;
do {
// act1
i--;
} while(i!=0);
int j;
for(int i=0;i<=9;i++)
{
j+=i;
}
char c=IN.getChar();
switch(c) {
case ‘a’:
case ‘b’:
// act1
break;
default:
// act2
}
22. Constructors in Java
Constructor is a special type of method that is used to initialize the object
There are rules to define a constructor
- Constructor name must be as same as the class name
- Must not have an explicit return type
There are two types of Constructors in Java
- Default constructor
- Parameterized constructor
If there is no constructor in a class, compiler will automatically create a
default constructor
Defaulot construtor will set default values for class variables wheras if
you want to set values of your own then go for a parameterized
constructor
23. Constructor Overloading in
Java
A class can have any number of
Constructors
Number of parameters and type
of them differentiate each one
another e.g:-
24. Method Overloading in java
If a class have multiple methods by same name but different parameters it
is known as ‘Method Overloading’
Method Overloading increaces the readability of the program
There are two ways that we can overload methods
- By changing the no of arguments
- By changing the data type
27. Method Overloading in
java…
Can we overload methods by changing their return types?
NO, method overloading cannot be achieved by changing the return type of
the methods.
e.g:- int sum(int a, int b){};
double sum(int a, int b){};
int result=sum(10,30); //Compile time error!
Can we overload main() method of a java program?
YES. You can have any number of main methods in your java class through
method overloading. This is achieved by changing the parameters of the
main method
28. Method Overloading & Type
promotion
One type is promoted to another type implicitly if no matching data type is
found
byte
short
int
long
char float
double
Since no method with two int arguments are found, the compiler will automatically
considers the method with int, double (second int literal will be promoted to double)
29. Method Overriding in Java
If subclass provides the specific implementation of the method that has
been provided by one of its parent class, it is known as method overriding
in java.
Method overriding is used for runtime polymorphism
Rules for method overriding in Java
- Method must have the same name as in the parent class
- Method must have same parameter as in the parent class
- There must be an IS-A relationship (inheritance)
We can override methods by changing their return type only if their
return type is covariant (subtype of the super method’s return type)
30. Method Overriding in
Java… Example
•
• run() method is overridden in Bike
class with its own implementation
• super keyword is used to access
the parent class method
• During runtime it decides which
method to invoke. This is called
runtime polymorphism
• Static methods cannot be
overridden in java
• Thus main() method cannot be
overridden.
31. Method Overriding Vs
Method Overloading
Method Overloading Method Overriding
Used to increase the readability of the program Used to provide the specific implementation of the
method that is already provided by its super class
Is performed within the class Occurs in two classes that have an IS-A
relationship (Inheritance)
In case of method overloading, parameter must be
different
In case of method overriding, parameter must be
same
Is an example for compile time polymorphism Is an example for runtime polymorphism
In Java, method overloading cannot be performed
by changing the return type. Return type must be
same or different but you have to change the
parameter
Type must be same or Covariant in method
overriding
32. ‘Super’ Keyword in Java
Super is a reference variable that is used to refer immediate parent class
Object
e.g:- When you create a Student object, a Person
object also being created automatically.
There are three main usages of ‘super’ key word in Java
Person
Student
33. ‘Super’ Keyword in Java…
1. ‘super’ is used to refer immediate parent class instance variable
34. ‘Super’ Keyword in Java…
2. super() is used to invoke immediate parent class constructor
35. ‘Super’ Keyword in Java…
3. Super is used to invoke immediate parent clas method
37. Access Modifiers in Java
Access Modifier Within Class Within Package
private Yes No
Default Yes Yes
Protected Yes Yes
Public Yes Yes
Note that there is no keyword call Default. A variable/
method defined without any access modifier is a
variable to any other classes in the same package.
E.g:- the fields of an interface are implicitly public static
final, the methods of an interface are by default public
Can’t apply to classes and interfaces . Fields and
methods that are marked as protected in a superclass,
only its subclasses can access them.
38. Access Modifiers in Java…
Where to use protected access modifier?
• If the openSpeaker() method is
marked as public, then any class
can access it.
• If openSpeaker() method is marked
as private then it is accessible only
within the AudioPlayer class
• To allow only its subclasses to use
it, we have to mark it as protected
39. Access control and
Inheritance
These rules must be enforced in inheritance
Methods declared public in super class must be marked as public in all of
its subclasses
Methods declared protected in super class can either be marked as
protected or public in its subclasses
Methods declared private are not inherited at all, so theres no rule for
them.
40. Arrays in Java
Java Array is an object that contains similar type of data
We can store a fixed set of elements in Java Array
Array in Java is indexed based, first element is stored at index 0.
0 1 2 3 4 indicesFirst index
Array length
41. Arrays in Java…
Advantages of Java Array
Code optimization (we can retrieve or sort data easily)
Random Access
Disadvantages
Size limit – we can store only fixed size of elements in java array. It
doesn’t grow as we store elements at runtime
Types of Arrays in Java
1. Single dimensional Array
2. Multidimensional Array
42. Arrays in Java…
Declaration syntax for single dimensional Array
dataType[] arr;
dataType []arr;
dataType arr[];
Declaration syntax for multi dimensional Array
dataType[][] arrayRefVar;
dataType [][]arrayRefVar;
dataType arrayRefVar [][];
dataType []arrayRefVar [];
43. Arrays in Java…
Initializing Single dimensional
Arrays in Java
int arr;
arr=new int[10];
arr[0]=23;
arr[1]=54; etc…
OR
int arr[]={23,54};
Initializing Multi dimensional
Arrays in Java
int[][] arr;
arr=new int[3][3];
arr[0][0]=10;
arr[0][1]=30;
OR
Int arr[][]={{1,2,3},{4,6,7}, …};
44. Final keyword
final class Base {
final int i=5;
final void foo() {
i=10;
//what will the compiler say
about this?
}
}
class Derived extends Base {
// Error
// another foo ...
void foo() {
▪final member data
Constant member
▪final member function
The method can’t be
overridden.
▪final class
‘Base’ is final, thus it can’t be
extended
(ie: String class is final)