Monday 28 October 2019

Latest Selenium Interview Questions [Updated 2019]

Selenium Interview Questions and Answer 2019


Selenium is one of the most used automated test packages. Selenium was created to guide and inspire automation tests of practical aspects of web-based applications and also a wide range of browsers and platforms. By being in the open-source community, it has become one of the most accepted tools among detection specialists. Check out more selenium tutorials to learn selenium and automation testing.

Below are some of the latest selenium testing interview questions for experienced and freshers.


selenium interview questions


Selenium Webdriver Interview Questions[Selenium IDE and Selenium Grid]


1. What Operations Can selenium do?
Selenium could be used for the intentional, regression load test of the Internet-based program. The automation tool can be run for post-launch validation with continuous integration tools such as Jenkins, Hudson, Speedy Build or Cruise Control.

2. What are the Automation tests?
The automation test or Check Automation is a procedure to automate the manual procedure to examine the program/program under evaluation. Automation tests include the use of another s / w evaluation device that allows you to generate test programs that can be run over and over again and do not require any manual intervention.

3. What would be the advantages of automation tests?
The advantages of automation tests are:

Performance support for continuous test cases
Supports s / w detection of a large evaluation matrix
Power concurrent execution
Supports execution alone
Improves accuracy, thus reducing the malfunction created individually
Save time and cash.

4. What is the price of the selenium license per host?
Selenium is open-source software, released under the Apache 2.0 license and can be downloaded and used at no cost.

5. What is Selenium IDE?
Selenium IDE IS a Firefox add-on that records clicks, writing and other activities to perform test instances, which QA Tester can play in the Firefox browser or export to Selenium RC. Selenium IDE has the function of registering/reproducing the following attributes, step-by-step debugging and breakpoints, web page abstraction performance, an extensibility capability that allows the use of add-ons or personal extensions that extend the functionality of Selenium SDI

6. What are the limitations of Selenium IDE?
Selenium IDE has several excellent features and is a cost-effective and well-organized test automation application for building verification circumstances, at the same time, Selenium IDE does not have certain vital characteristics of a test program: conditional statements, loops, performance of registration, exception handling, performance reports, database detection, re-execution of failed tests and ability to capture screenshots. Selenium IDE is not compatible with IE, Safari and Opera browsers.

7. What exactly is the Selenium Remote-Control (RC) tool?
R. Selenium Remote Control (RC) is a solid solution for verification cases that need more than simple browser actions and linear execution. Selenium-Remote Control allows the development of complex test scenarios

8. When can I use Selenium IDE?
Selenium IDE is the simplest and simplest of all programs within the S / W program of the Selenium online course. Its reproduction function and documents make it extremely easy to understand with Mal's mini associates to any programming language. Selenium IDE is a great instrument for an innocent consumer.

9. What is Selenese?
Selenese is the vocabulary that will be used to publish test scripts in the Selenium in IDE.

10. Do you know different types of locators in Selenium?
The locator can be named as an address that recognizes a distinctly net component within the web page. Therefore, to recognize the network components correctly and we only have different types of locators in Selenium.
ID
ClassName
Name
TagName
LinkText
PartialLinkText
Xpath
CSS Selector

11. What is an Xpath?
Xpath can be used to find a net component according to its XML path. XML represents the extensible markup vocabulary and can be used to store, organize and transport information at random. Stores information in a set of integral values ​​that can be very similar to HTML tags. Both are dialects of marking and, since they are categorized as an identical umbrella, Xpath can be used to search for HTML components.
Far behind finding components that use Xpath is the bridge between numerous components throughout the site and thus allowing a person to discover a feature with the guidance of another component.

12. What are the advantages of selenium over other automation tools?
Selenium is a free and open-source.
It has a large user base and helps communities.
It has cross-browser compatibility (Firefox, Chrome, IE, Safari, etc.)
It has amazing platform compatibility (Windows, Mac OS, Linux, etc.)
It is compatible with numerous programming languages (Java, C #, Ruby, Python, Pearl).
It has clean and regular repository developments.
It supports scattered tests.

13. Explain Selenium Suite?
Selenium Integrated Development Environment (IDE) Selenium IDE is a recording and playback application. It is distributed as a complement to Firefox.
Selenium Remote Control (RC) Selenium RC is a host that allows the user to create test scripts in the desired programming language. In addition, it allows you to run test scripts within the broad spectrum of browsers.
Selenium WebDriver WebDriver is not the same instrument as the many advantages of h-AS over Selenium RC. WebDriver communicates immediately with all browsers and uses its native compatibility to automate.
Selenium Grid Selenium Grid is used to distribute your test run across multiple platforms and environments at the same time.

14. What are the hat tests that Selenium can support?
Selenium supports the following varieties of tests:
Functional testing
Regression tests

15. What are the limitations of selenium?
Selenium supports testing of only Internet-based applications
Cellular applications cannot be examined with selenium
Captcha and barcode readers cannot be analyzed using Selenium
Reports can only be generated using third-party resources such as TestNG or Junit.
As Selenium is a completely free program, there is no ready vendor support, although the user can locate numerous help communities.

16. What is the difference between "/" and "//" in Xpath?
"/" In XPath it is used to produce Xpath with the full path, that is, XPath could be produced to start choosing from the initial file node.
"//": A bar is used twice to generate Xpath with a relative path, that is, the XPath could be produced to start choosing from anywhere in the file.

17. What are the flexibility of the Selenium test suite?
A. The selenium test set is highly adaptable. There are numerous ways to incorporate functionality into the Selenium framework to customize test automation. Compared to other test automation tools, it is the most powerful feature of Selenium. Selenium Remote Control support for various programming languages ​​and scripts allows the test automation engineer to build whatever logic they want in their automated tests and work with a favorite programming or scripting language of their choice. In addition, the Selenium test package is an open-source project where the code can be modified and improvements can be submitted for your contribution.

18. What programming languages ​​can you use in Selenium RC?
C #, Java, Perl, PHP, Python, Ruby

19. What test can selenium do?
Selenium is essentially used for the functional testing of web-based programs. It can be used for detection in the continuous integration environment. It is also really useful for agile tests

20. What are the pros and cons of using Selenium as a test tool?
Advantages: Free, simple and strong DOM (document object model) level tests can be used for continuous integration; Great fit with agile jobs.

Disadvantages: complicated configuration; sad error analysis; cannot test client-server applications.


21. Which browsers are compatible with Selenium Remote-Control?
Test automation can use the Firefox, IE 7/8, Safari and Opera browsers to run tests on Selenium Remote-Control.

22. What exactly is the price of Selenium test-suite?
The selenium test suite is a set of open-source software tools, free of charge.

23. How to start the browser using WebDriver?
This format can be used to set the browser:
WebDriver driver = new FirefoxDriver ();
WebDriver driver = new ChromeDriver ();
WebDriver driver = new InternetExplorerDriver ();

24. What is it possible for the United States to suggest using Selenium 1 and Selenium 2?
The Selenium RC and Selenium WebDriver tutorials, in a mixture, are commonly referred to as Selenium 2. Selenium RC is also only known as Selenium 1.

25. When can I use Selenium Grid?
Selenium Grid allows you to perform the same or different verification programs on several s / w and browsers simultaneously, therefore, to obtain extended evaluation performance, s / w evaluation in different environments and unexpectedly preserve the moment of performance.

26. Describe the specialized problems you had with Selenium Tools.
As with any other form of test automation tool such as Silk Test, HP QTP, Watir, Canoo Webtest Selenium allows you to record, edit and debug test cases. However, there are several problems that seriously affect the ability to maintain the test circumstances recorded, sometimes quality control engineers complain that it takes longer to maintain automated test cases than to perform manual detection, however, This can be a problem with all automatic test programs and most likely related to the poor design of the test frame.

Another problem is the complicated identification of an HTML element. If the IDs are generated automatically, the verification instances of the recorder may fail during playback. The alternative solution would be to use Xpath to discover demanded HTML elements. Selenium is compatible with AJAX without difficulties, but QA Tester must be constantly aware that selenium does not understand when the AJAX action is completed, so Click And Delay will not work. Instead, QA Tester could use the interrupt, but the impact of several pause instructions would really reduce the total test time to prove the circumstances. The best solution will be to use wait for Component.

27. What are the different types of WebDriver instances in selenium?
Firefoxdriver
InternetExplorerDriver
ChromeDriver
Safaridriver
Operadriver
AndroidDriver
IPhoneDriver
HtmlUnitDriver

28. What are the different types of waiting at Selenium?
There are two types of accessible delays Selenium Webdriver
Implicit wait
Wait explicit

Implicit wait: implicit delays are used to provide a predetermined wait time (30 seconds status) between each successive measurement/order of evaluation in all test software. Then, the next evaluation measure could work simply when 30 seconds have passed after executing the previous evaluation measure/order.
Explicit wait: Explicit delays are used to avoid performance until a specific condition is met or the optimal period has elapsed. Unlike implied delays, specific delays are asked for a specific example only.

Sunday 27 October 2019

JAVA Logo: History and Explanation

JAVA Logo: History and Explanation

What is JAVA?


Java is a programming language it is simply one more programming language so what is uncommon about it Java contains broad libraries when you introduce Java or JDK it accompanies classes that can be utilized to accomplish an assortment of things you can utilize Java to make web applications you can likewise utilize it to make work area applications. Java was platform-independent language whose goal was to write code once and run anywhere you don't need to compile your source code, again and again, write once and just use the software's on any machine like Mac Linux Windows or any other operating system.

JAVA History


Java was not initially named as Java it was begun as a green project and began in 1991. Then the task got changed and got his name as oak there's a piece history about this name to the engineers may state that that the designers who initially made the Java were seeing loads of oak tree in their environment and that is the reason the venture was named as oak. Yet again the history got shaped out and the undertaking was named to Java maybe with a great deal of coffee that the designers were drinking and who realizes what the fact of the matter is yet it's being a legend out there and I accept that it's a reality out there then there was a first open discharge in 1995 and this was the first Java that turned out into the world. Therefore java logo is a coffee cup and you can find the logo on the internet with java logo png.



JAVA was initially created at Sun Microsystems in 1991 they needed to build up a programming language for little gadgets like TVs, VCRs, toasters and their objective was to make a compact little programming language initially the language was known as oak. it was discharged as Java in 1995 when Java was first discharged its designers composed a paper a white paper legitimizing another programming language you realize for what reason do we have to become familiar with another programming language and in that white paper they depicted Java as straightforward item arranged disseminated translated strong secure building impartial convenient superior multi-strung and dynamic language.


JAVA VS C++ or C++ VS JAVA



Java is certainly a basic programming language it is unquestionably simple, to begin with. it offers all the usefulness of C++. The once in a while utilized befuddling highlights of C++ the quantity of language builds is little contrasted with most other programming dialects and they chose to evacuate a portion of the highlights of C++ like pointers, structs, type, def. So Java doesn't have a pointers, not the manner in which they are actualized in C++, at any rate, there is no compelling reason to free memory in the event that you need to make an article in Java feel free to do so when you are finished with it you can simply forget about it there is no compelling reason to stress over expelling that item from memory.



Java doesn't bolster different legacy the main significant programming language that supports various legacy in C++ and they found dependent on the exploration that they did that by evacuating these highlights it chops down it might chop down half of the most widely recognized bugs that happen in C++.Java is object-oriented Java is a purely object-oriented programming language unlike C++ which only supports object orientation Java is considered a distributed programming language it has extensive support for TCP/IP and networking capabilities it also contains library routines for HTTP FTP protocols.






Java provides array bounds checking exception handling and bytecode verification all of these features make Java very robust. Java is also secure it's a very secure programming language it does not have any low-level functions file access can be programmatically restricted and when you run the code the interpreter verifies the bytecode.


Saturday 26 October 2019

[UPDATED] Random String generator for 2019

Random String generator

This random string generator will help to generate strings of any length. It would be helpful when task is to generate string of a specific character. Go ahead and generate the random string of any length.

random string generator


Enter the limit for random string






Saturday 19 October 2019

Unit testing Java: What is a unit test?

Unit Testing


Unit testing is mainly focus on the smallest element of software design so that it is focused on the modules or software components is divided into different levels. It takes on the smallest element in the software design and try to test on that smallest unit again after that day it is integrated to the main next level module and again they're tested like that. The unit testing is only focus on the smallest element of the software design so it make heavy use of all the main thing is it makes heavy use of white box testing. White box testing mainly focused on the internal structure of the module means testing is completely done on internal structure internal code or structure.


Testing is such a huge important part of web development in general so that is something which we will be focusing on because there's a lot of different types of testing whether that's integration tests, systems testing, stress testing, performance testing all sorts of stuff. Unit testing can be kind of confusing people see the word thrown out a lot like what is unit test right at the end of the day your code is broken up into units right and you might think of these units as maybe like a function or a class or just various different things in your code that do stuff and we're gonna actually go over a specific function in unit tests here in a second and what a unit test does is it essentially just confirms that that bit of code is doing what it's supposed to be doing and unit tests can certainly save your butt along with a host of other styles of testing.




As mentioned unit test tests a specific unit of your code to make sure that it's working you could think of this in a non web development or non coding things as a door right. Unit tests allow you to make changes and updates to your code in all sorts of areas whether that's the implementation of that particular unit or that unit along with other units or whatever it allows you to make changes to your code and have a understanding that it's going to work without having to actually manually check it.

unit testing


Lets understand unit testing with an example, Suppose we have an Asssignment of creating a calculator which can perform operation such as addition, subtraction, division and multiplication. This system i will be dividing into subsystems means the sub modules so rather than working on complete module I divided the module into units a small units so that i ams sure each module or operation is working as expected. Operations is addition is working properly or not subtraction, multiplication is working or not. This testing is known as unit testing where we have divided the end system into units and testing is performed in individual units rather than waiting for the end product and perform the testing at once. This units will be independent of each other so we testing can be performed in units without any dependency of other modules.

Thursday 17 October 2019

Tosca Automation Tool : What is Tosca tool

Tosca Automation Tool


let me give you a brief introduction about Tosca test suit I'm going to talk what is Tosca suit and comparison of Tosca with other test automation tools like selenium or QTP and also the advantages and disadvantages of Tosca test suit. So let us start about what is Tosca test suit.

So Tosca is a test automation tool automation testing tools developed by TRICENTIS. You must be hearing about Tosca since last three or four years or max five years, so the current version of Tosca is over Central and they have done lot many improvements and also they have added lot many features in the Scottish word so it is a test automation tool where you can automate your almost all kinds of application whether it is your GUI application like your web application or desktop application or your non geo applications such as your XML or any other Jason or might be your SAP application might be run from application whether it is mobile testing whether it is a load testing almost twice a try tricentis is trying to cover all the things in this complete package.

Tosca test suit is a test automation tool where you can perform lot many kind of testing activities. It is a test management tool because normally we use QC as our test management tool where we write our test cases where we execute our test cases on the similar lines of suit can be used to perform your manual testing as well where you can create or record your manual test cases you can execute your manual test cases as well. It is a management tool like till now we were using Quality Center to add our requirement excuse me are nowadays we are using JIRA where we do add our user story and all those things.


Tosca testing tool


In Tosca as well you can do all things like you can do a planning test planning you can do you can add the requirements you can link the requirements to your test cases or you can link the requirements to your test execution list. Linking the requirement gives you the status of the actual current status of the particular requirement. what's the like how many person do the test cases are written for this specific requirement how many number of percentage of test cases are executed for this requirements out of that what is passed percent,fail percentage and everything will be getting because we are we are linking the requirements to a test cases and execution list so that so it is a test management tool as well as the management tool where it it produces a good dashboard to see what an old requirements are covered what's the current status. The biggest advantage is it is a script less test automation tool and it makes the test case more readable. So just like how you read the manually written test cases on the similar line not exactly but a very good way you can read the test cases which are there in two test suit.It supports your manual test cases as well it supports your automated test case whether it is your GUI non-jew way that supports mobile legacy applications

Tosca looks very much better but the thing is only it is a paid tool and bit costly. Most of the organisations go for selenium because for selenium there is a huge what I guess the resources available in the market as well as on Internet and also you can find the useful material and selenium supports many technologies rate. It supports Java, Python and all other languages but though Tosca has its own feature own uniqueness it is a script less and supports it's the complete bundle so you can perform maximum of the activities in single tool itself.

Tosca supports almost all the kinds of the applications qtp supports like your web and desktop application whereas selenium supports only your web application. it is model-based whereas qtp is based which you cannot understand the scripts just by reading it whereas if it is a model based you can easily read the test cases. selenium is again code based you may not be able to read and understand the test cases if you are a non techie scripting required for a task. Today 99% of the scenarios there is no need to do a coding or scripting but in and one percent in very rare scenarios you might need to do according to develop special execution tasks. 


Tuesday 15 October 2019

Selenium Testing Automation - What is selenium

Selenium Testing Automation - What is selenium?



Selenium has become one of the most powerful tool for testing web applications so how does selenium help so we saw all the T merits of manual testing so we can save by automation of test cases one selenium helps in speedy execution of test cases since manual execution is avoided the results are more accurate no human errors since your test cases are automated human resources required to execute automated test cases is far less than manual testing because of that there is a lesser investment in human resources it saves time and you know time is money its cost effective as selenium is an open source it is available free of cost early time to market since you save effort and time on manual execution your clients will be more as you would be able to ship your product pretty fast lastly since your test cases are automated you can rerun them any point of time and as many times as required.

Selenium tool offers so many benefits we definitely want to know more detail about what selenium is selenium enables us to test web applications on all kind of browsers like Internet Explorer Chrome Firefox Safari edge opera and even the headless browser selenium is an open source and it is platform independent the biggest reason why people are preferring this tool is because it is free of cost and the qtp and the rfp which we talked about are chargeable selenium is a set of tools and libraries to facilitate the automation of web application as I said it is not a single tool it has multiple components which we'll be seeing in detail in some time and all these tools together help us test the web application you can run selenium scripts on any platform it is platform independent why because it is primarily developed in JavaScript it's very common for manual testers not to have in-depth programming knowledge so selenium has this record and replay back tool called the selenium IDE which can be used to create a set of actions as a script and you can replay the script back however this is mainly used for demo purposes
only because selenium is such a powerful tool that you should be able to take full advantage of all its features


  • Selenium provides support for different

  • programming languages like Java Python, c-sharp Ruby so you can write your test scripts in any language you like one.

  • Need not know in-depth or advanced knowledge of these languages also

  • Selenium supports different operating systems it has suppose for Windows, Linux and ubuntu.

Selenium is the most popular and widely used automation tools for automating your web applications selenium set of tools.As you know every tool has its own limitation so does selenium has


  • Cannot test mobile applications requires framework like APM.however what selenium provides is a support for integrating this APM tool which is nothing but a mobile application automation tool and using APM and selenium you can still achieve mobile application automation
  • Webdriver we can achieve only sequential execution.
  • selenium webdriver has a limited reporting capability it can create basic reports but what we definitely need us a more so it does support some tools like say extent reports.


selenium automation testing

Programming language it supports to write effective automation scripts. So this you could look at it as an advantage or disadvantage so overall if you look at all this selenium still provides a complete solution for our automation meet and that is why we can still say that selenium is one of the most popular tool used in the industry today for your web application. Automation all right key takeaways so overall in this article we saw the disadvantages of manual testing what pushed us to look at automation and then we saw one of the most powerfull tool available today for automating web application that is selenium.

Wednesday 21 August 2019

Java VS Javascript - Difference between java and JS

Java vs Javascript


java vs javascript



What is Jscript?


JavaScript(JS or JScript) is a client side programming language used to add programming logic to web pages. This is how you can understand it. HTML is a designing language and it only designs web pages. You cannot perform any logic in web pages through HTML. For example, when the user clicks on the link, you want to perform some processing by calling a function. But you cannot do this through HTML, because HTML is used only to design web pages. For this you need a programming language.

Dynamic web page in Javascript

JavaScript is a similar programming language that adds logic to web pages and makes them dynamic. It was developed by Sun Micro Systems. It was earlier named Live Script which was later changed to JavaScript. JavaScript has object oriented programming capabilities. It is defined in the head section of the HTML file. You cannot perform any calculations with HTML if you do not use JavaScript. You can also perform validation with JavaScript. JavaScript is a programming language that browsers understand and is used exclusively for web pages.

Features of JavaScript


There are 2 important features of JavaScript, which are given below.

Dynamic

JavaScript is able to generate dynamic web pages. JavaScript is capable of making changes in the web page as soon as it is loaded. While loading web pages, it can be decided what task to perform. While this does not happen in HTML, all the actions are already defined in it and you cannot take any action in the load time of web pages generates HTML static pages. But JavaScript generates dynamic pages. For example, the JavaScript page can show weather according to your location while loading.

Client Side

JavaScript is a client side scripting language. Any execution in PHP is performed on the server. But not so with JavaScript. When you use JavaScript, any execution is performed on the client side. For example, validation in JavaScript is performed in the web browser on the client side. But validation in PHP is performed on the server because of this JavaScript reduces the load of the server.


Advantages of javascript 

Javascript is fast

JavaScript is very fast due to being client side. Because it does not waste time in establishing connection to the server. JavaScript executes without connection to the server.

JavaScript is cross platform

JavaScript runs smoothly on any browser and operating systems without any problems. All latest browsers support JavaScript by default.

Javascript works with multiple languages

JavaScript can easily work with other languages. Such as HTML, CSS and PHP etc.

Javascript is Simple

JavaScript is a very simple language. Anyone can learn and implement it easily.


Disadvantages of JavaScript


Apart from the advantages, there are also the disadvantages of JavaScript which are given below.

Less secure

The code of JavaScript executes on the client side, so some viruses can come in it. Because of this JavaScript is not considered to be very secure.

Execution Vary

JavaScript gives different results on different browsers. But this is not the case with server side scripting languages. The server side script always returns the same result, regardless of the browser.

No Support for Network Applications

JavaScript cannot work with network applications because there is no support available in JavaScript for this.

Functions of JavaScript

  1. JavaScript is used to create dynamic web pages.
  2. Highly interactive web pages are created from this.
  3. By performing validation on the client side via JavaScript, you can reduce the load of the server.
  4. With this you can solve many problems related to browser.
Thats all we have for JS, Now let us discuss what is java and what is difference between java and javascript.


 JAVA



 History of Java


Java is a general purpose object oriented programming language. Sun microsystems java 1991 Was made in Earlier java was named oak but later it was changed to java. Java was developed by James Gosling. Java was primarily developed to make consumer electronics such as TV, VCR etc. software.
The most important and popular feature of Java was that the java platform was independent. Because java was not made for any particular hardware or operating system. Therefore programs created in java can be executed on any system. This feature of Java makes java the most popular language even today.

Features of Java


Java has many features. To become a good java programmer, you should know all these features. Let's try to learn about some popular features of java.

Compiled and Interpreted


Most programming languages ​​are either compiled or interpreted. But java combines these two approaches and creates a two stage system. First, java compiler your program and generate byte code.

Byte code does not contain machine instructions. Therefore java generates machine code by interpreting bytecode in the second stage, which can be executed directly.

Java is platform independent

Makes Java bytecode platform independent. When you compile a java program, it is converted into byte code. This byte code cannot run on any machine or operating system. It only runs on JVM (Java Virtual Machine).

To run Java's program, you have to install JVM on your operating system. There is a separate JVM for each operating system but all do the same. And that is to convert bytecode into machine code for that operating system.

So the bytecode generated by the JVM of one operating system can be run on any other JVM. And then the JVM generates machine code for that operating system. So different machine code is generated for different machines but it is generated from the same byte code because your program is first converted to byte code.

Java is object oriented

Java is a true object oriented programming language. Almost everything in Java is object. Java stores all information as objects.

Robust and Secure

If we talk about user experience then java is a robust language. Any program created in Java can work in different environments with different technologies without crashing. Its programs never crash. It is very reliable language. Security in Java is provided by JVM. The machine detects invalid combinations by running some tests on the JVM before generating the code.

Distributed

From Java you can create distributed applications. Distributed applications are applications that are on different networks. And perform the task together. Through RMI in Java, you can interact with the applications available on other networks.

Simple and famous

Java is a simple language. Many features of Java are derived from c and c ++. Java's syntax is similar to c and c ++. Such as variable declarations, control statements and method declarations etc. All these make java easy to understand. Because java is designed with c and c ++ in mind, it seems familiar to most programmers.

Multi-threaded and Interactive

By default java is a multithreaded language. Any java program can complete many tasks simultaneously. This feature makes java fast and interactive.

High performance

When it comes to performance, the performance of java is very impressive. Java's speed is the main reason byte code. The architecture of Java is designed in such a way that the overhead at junta is very low.

Dynamic and Extensible

Java is a dynamic language. Java is capable of dynamic linking from libraries, methods and classes during run time. Therefore java can be used easily with new technologies.

Ease of Development

Developing programs in Java is very easy. Java provides you with built-in libraries which contain important classes for your use. This reduces the overhead of the programmer. The programmer can easily develop software by accessing these libraries.

Object Oriented Principles of Java

As I told you java is an object oriented language. Java also follows object oriented principles like all object oriented programming languages. Let us try to learn about these principles.

Encapsulation

Encapsulation is also called data hiding. In encapsulation you declare private variables. And access them through public methods, your variables can be accessed by methods of your own class.
No other class can access your variables. In this way, you also hide and use the data. Another means of encapsulation is to bind data and code to a unit and prevent access from outside


Thats all we have for difference between java and javascript. Java is an object oriented language whereas javascript is object based scripting language.




Monday 12 August 2019

Exception handling in Java - handle exception in java

Exception handling in Java

Exception handling in java

Exception handling is a very important feature in Java. This helps in handling bad user experience. Exceptions are run time errors. Exception is a situation that stops the program while you are running. Just as the amount of memory your program needs to execute, if your memory is not in your computer, then execution of your program will stop. This is the out of memory exception. Similar situations are called exceptions in java and they are handled. Exception handing plays very important part in selenium. Exception handling interview questions will be based on below tutorials. Let's start with exception handing in details

Program Crashes


Just like if you forget to put semicolon in front of a statement while creating a program, then the program error shows you and is not compiled. Similarly, when exception is generated in java (or not handled), your program stops and does not execute.

Handle a java program


If you want that your program does not stop executing on the exception, then for this you have to handle exceptions. This is called exception handling in java. When you handle exceptions, your program does not stop at the exception, but instead executes the rest of the code by skipping the exception code.

Java Exception Handling


In Java, you handle exceptions with the help of some keywords. All these keywords together form a structure that is very easy to implement.

Try

The code of your program that can generate an exception, you write it in the try block. For example, you are doing a mathematical operation in the program and you feel that an exception can be generated, then you write that code in the try block.

Throw

Most of the possible exceptions are already defined in the java library for you and these exceptions throw java automatically, you just have to handle them. But if you want, you can also create your own exceptions. You have to throw such exceptions yourself, for this you use throw keyword. You can also throw a predefined exception if you want.

Catch

If an exception is generated in the try block, it is handled in this block. You write the code in this block that you want to execute when an exception occurs. For example, you can print a message that tells the user that an exception has been generated.


Throws

You can use nested try blocks. And in such a situation, if you want an exception to handle the outer try block, then in such a situation you use the throws keyword. You write the names of all exceptions by putting the throws keyword next to the definition in the method. If an exception occurs, the outer try block handles it.

Finally

After handling the exception, you finally write the code you want to execute. After the exception in the try block, the compiler does not execute that code and finally executes the block directly after the catch block.

Steps to Handle Java Exceptions

First of all, write the code in the try block from which exception can be generated.
After the try block, write the code to handle runtime exception in java in the catch block. As such, you can print a message related to the exception.

After handling the exception, finally write the code that you want to execute. It is very important for you to know about exceptions before handling the Exceptions. There are some exceptions that occur regularly in java. You can easily practice on these common exceptions and improve your skill. Some common exceptions coming regularly in Java are being described below.

Exceptions in Java


Arithmetic Exceptions

Any arithmetic error such as Arithmetic Exception is generated if you try to divide a number by zero or try to store more value than its size in a variable.

Class cast exception

Class-Cast-Exception is generated if you want to store the reference of a class to another class and if the first class is not a subclass of the second class.

Array Store Exception

If you have created a string array and you try to store string in it, then Array-Store Exception is generated.

Array Index Out Of Bounds Exception

Array-Index-Out-Of-Bounds-Exception is generated if the size of your array is 10 and you try to store the value at the 11th position or access the 11th position.

Illegal Argument Exception

Illegal-Argument-Exception is generated when you pass an invalid argument in a method such as passing the string instead of int.

Null Pointer Exception

In Java you can assign null value to a reference variable, but if you try to use this reference variable, NullPointerException is generated.

 Number Format Exception

When you try to cast a string value to a number, a Number-Format-Exception occurs.



We will bring more exception handling in java with examples. To know more about testing check this : Manual Testing




Friday 9 August 2019

SDLC Phases : Software development life cycle



software testing life cycle - SDLC phases


What is SDLC?


The full name of SDLC is software development life cycle. It is also called system development life cycle. SDLC describes the life cycle of a software or system and SDLC is a process of how system is developed. Software development methodologies or SDLC methodologies plays important role in software development and software testing. Database design is a fundamental component of SDLC. All the steps or process that takes place in building any system is called the system development life cycle (SDLC). SDLC is the mose important topic if preparing for ISTQB.

Similarly we have STLC which stands for software testing life cycle which describe the life cycle of software testing with different testing phases such as Requirement analysis/ Requirement gathering, Test planning, Test case development, Environment setup , Test execution and Test case closure. Now let’s start with learning SDLC phases in detailed manner.

 SDLC Phases:


There are five phases / steps in system development life cycle. Which is as follows: -

  1. Planning
  2. Analysis
  3. Detailed system design
  4. Implementation
  5. Maintenance



1. Planning: - What is the first step of the system development life cycle? In the planning phase and analysis , we discuss what we want the software to achieve or what its goals are. The quality requirements and risk identification of the software are also included in the planning phase and while planning phase it should be primary aim to deliver high quality software.
In this phase we see whether the system (software) that is present is doing its work properly or not. If he is doing his job properly then there is no need to change him. In this we also evaluate the cost. How much cost will be required to design the system, this all comes in the planning phase.

2. Analysis: - In the planning phase, problems are defined and in the analysis phase those problems are examined with more details. In the analysis phase, the user requirements are seen, what are the needs of the end users. In this phase the hardware and software of the system are studied thoroughly. In this, both end users and designers together solve the problem areas.

3. Detail system design: - We always have a question that what is the design phase in SDLC? In the detail system design phase, the designer completes the design of the system's process. The system includes complete technical specifications so that the system becomes even more interactive and efficient.

4. Implementation: - In this phase, hardware, DBMS software and application programs are installed and database design is implemented. Before database design can be implemented, the system has to go through testing, coding, and debugging processes. This is the longest running phase in SDLC.

5. Maintenance: - This is the last phase of SDLC. When the system (software) is ready and the users start using it, then the problems that come in them have to be solved time-to-time. Maintaining the finished system (software) in a timely manner and maintaining it is called maintenance. SDLC has three types of maintenance: - Corrective maintenance, adaptive maintenance and Perfective maintenance.

Software development life cycle phases

  • Requirement gathering
  • Feasibility Study
  • Requirement gathering
  • System Analysis
  • System design
  • Software Development
  • Testing
  • Implementation
  • Maintenance
  • Review


1. Requirement Gathering: - The first step of the system development life cycle is to find out the real problem of the system and to do any further work without knowing the problem in the system is to make the effort fruitless. Problems in any system define user requirements. In this phase, the system analyst discovers the problem and discuses what we have to achieve from the system or what is its goal. In this phase we see whether the current system is doing its job properly or not. Both functional requirements and non functional requirements must be coved as a part of requirement analysis.

2. Feasibility Study: - Under the feasibility study, it is considered whether to improve the existing system or to develop a completely new system. The feasibility study helps in understanding the overview of the problem. The feasibility study is done to ensure that the project is carried forward, or to postpone or cancel.

3. System Analysis: - System analysis is the most important phase of the system development life cycle. In the first phase the problem is defined, and in this phase those problems are investigated with more depth. In this stage the user requirements are seen, what are the needs of the end users. In this phase the hardware and software of the system are thoroughly studied. In this, both end users and designers together solve the problems.

4. System design: - In this stage the designer completes the design of the process of the system. The system includes complete technical specifications so that the system becomes even more interactive and efficient.

5. Software Development: - Creating software or program after system design is the next stage of SDLC. Development is the stage where the programmer coding the program according to the system design means that in this phase the system changes to actual.

7. Software Testing: - System testing is done in this phase before the database design is implemented. This is the testing phase in the system development. The main is to deliver quality software to the customer. The system has to go through testing, coding, and debugging process. This is the longest time in SDLC. Want to know more about software testing check Software Testing

6. Implementation: - In this step, hardware, DBMS software and application programs are installed and database design is implemented.

7. Maintenance: - When the system is ready and the users start using it, then any problem that comes in them has to be solved from time to time. Maintenance of the finished system according to time is called maintenance.

8.Review:- When the system is implemented, the user is asked to review whether the system is capable of meeting the user's requirements.


Manual Testing Tutorials - What is manual testing



What is manual testing

What is Manual Testing?

Software testing is done to find the process or method of finding errors / errors in the software application or program known to enable the application to function according to the need of the end users. This is the prime responsibility in manual testing jobs.

Manual testing involves manually testing a software without using any automated tools or any scripts as we create selenium script for automation testing. Thus, the manual tester plays the role of a end user who tests the software to identify any unexpected behavior, bugs or defects. There are various steps for manual testing such as unit testing, integration testing, system testing, and user acceptance testing.

Where software testing is done to find the process or method of finding errors in the software application or program known to enable the application to function according to the need of the end users.

According to the definition of manual testing - the process of analyzing software items to detect differences between existing and required conditions and to evaluate the features of software items.

Automation testing is also part of software testing where automation testing tools are used to perform actions automatically. Manual testing interview questions basically comes from basic of manual testing where many skilled testers struggle. Lets discus below types of manual testing or Manual testing tutorial.


Methods of Software testing

1. White Box Testing:


White-box testing is also called open-box testing or glass box testing . White-Box Testing is a detailed examination of internal logic and code structure. The tester monitors the source code and finds out which unit / part of the code is behaving incorrectly. White-Box Testing is used to design the test case of the programming scheme along with the internal perspective of the system. This testing is usually done at the unit level.

2. Black Box Testing:


It is also called Behavioral Testing. This is the technique of manual testing without any knowledge about the internal work of the application is called black-box testing. In this manual tester is not aware of the architecture of the system and don't have much coding knowledge.
Typically, while performing black-box testing, the tester interacts with the user interface of the system by giving input and checking its output, without knowing how and where the input is handled.


3. Gray-Box Testing:


Gray-Box Testing is a technique for testing applications with limited knowledge of the application's internal functionality. In software testing, the more you know the tester phrase, the better the application can be tested. Unlike black-box testing, where the tester only tests the user interface of the application. In gray-box testing, the tester has access to the design document and database. With this knowledge, a tester can create better test data and test scenarios.

Types of Software Testing


A. Functional Testing:


It is a type of black-box testing that is based on the specifications of the software being tested. The application is tested by providing input and then checking the results which should correspond to the intended functionality for it. Functional testing of a software is performed on a complete, integrated system, which evaluates system compliance according to specific requirements.

Type of Functional Testing

1. Integration Testing


Integration testing is defined as testing the combined parts of an application to determine whether they function correctly.Integration testing can be done in two ways: bottom-up integration testing, top-down integration testing and mixed integration testing.


2. Unit Testing


Unit Testing is done to check if different modules of the source code are working properly. That is, in the developer's environment, each unit of the application is tested separately by the developer.The goal of unit testing is to separate each part of the program and to check that all the requirements.

3. System Testing:


System testing fully tests the system. Once all components are integrated, the entire application is rigorously tested to see that it satisfies the specified quality standard. This type of testing is done by a specialized testing team.

4. Regression Testing


Whenever a software application changes, it is quite possible that other applications within the application have also been affected by this change.Regression testing is done to verify that the fixed bug is not violating other functionality or business rules.

5. Acceptance Testing


This testing is done to get customer sign-off, so that the software can be delivered and payment is received.

B. Non-Functional Testing:


This is based on testing an application with non-functional features. Non-functional testing involves testing software from requirements that are non-functional in nature but are important for performance, security, user interface, etc.

1. Performance Testing:


It is mostly used in software to identify any bottlenecks or performance problems rather than finding bugs.There are various reasons why the software performance is low - Network delay , Load balancing between servers, Data rendering, speed, capacity or Stability.

2. Load Testing:

It is the process of examining the behavior of software by applying the maximum load in terms of accessing the software and manipulating large input data. This can be done in both normal and extreme load conditions. This type of testing identifies the software's maximum capacity and its behavior at peak times.

3. Security Testing

Security testing involves testing the software to identify any defects in security. This is perform on applications to check if it is free from any risk , vulnerabilities or threats.



Manual testing interview questions will be asked maximum of the time from above discussed topics. We will soon be posting manual testing resume which will help in finding relevant manual testing job.

For Automation testing resume check out here : Selenium Resume








Saturday 3 August 2019

Selenium with cucumber interview questions

Selenium with cucumber interview questions

Selenium with cucumber interview questions

Cucumber Interview Questions

This tutorial would be very useful for all the selenium automation tester out there who are planning to switch to another company or actively looking for a job change. As we all know that selenium skills is rising over the past couple of years and it has become difficult to crack interview with the increase in competition in this skill. We would be discussing few of interview questions on selenium which interviewer most of the time seeks the interviewee to answer. We have few selenium interview questions that will help in preparing for interview


That's why the easiest way to crack any interview is preparation. As selenium or automation testing is skill set that is required by maximum of the organization because of it being open-source, free and support of different programming language like java, c# , Ruby or perl. Now lets have a look on automation test interview questions which are frequently asked in any QA automation interview.


Automation testing interview questions in selenium

1. Explain Framework used in selenium ?

This is most frequent as well as most important question asked to qa automation engineer. This question should be prepared at best when preparing for automation test interview. This answer will totally depends on framework used in your current project which can be cucumber,POM(Page object model) or using TestNG testing tool.

Answer to this question should start with explaining the framework which includes project structure (may vary if using POM or cucumber), packages names, page object java files, locators source file, reporting tool used etc.

For Page object model this must be explained as we are using page object model design pattern in current project with page factory. We have stored web element locators with xpath and css selectors in a separate file under a package name "locators". We write test case in separate file where we use the paths and execute the case using TestNG.

For automation engineers who are using Cucumber testing tool in project they need to explain it in a way that they are creating feature file, step definition file and page object file in separate packages and then running the feature file with runner class by providing tag in the class and adding it to the scenario in feature file. This need to be elaborate and in detailed way so interviewer gets confidence that you are a genuine resource with good hands on experience.

2. How to handle dynamic table in web page or web application.

This question is also frequently asked that how can we handle dynamic table in selenium. Interviewer intention would only to be see the approach we are using to validate the table. For answer please visit this post handle dynamic table in web page.

3. How to upload file using selenium automation tool?

This is also frequently asked in test automation interview questions, We can upload file using two method in selenium WebDriver by upload file in selenium webdriver using sendkeys and selenium webdriver using AutoIt. For more info visit this - Uplaod file in selenium

4. What is data driven testing and how to achieve?

Data driven means fetching the data from the excel sheet which we can use as test data. Instead of implicitly writing test data in the scripts it is always a better approach to keep the test data to excel sheet and fetch it using Apache POI API. For more information visit - Data driven in selenium

5. What is selenium IDE and how is it different from selenium grid?

This software testing interview question is asked just to check if we are aware of types of testing tools such as selenium IDE, selenium RC and selenium grid.

Selenium IDE is an Integrated development environment for selenium testing tool. It allow us to edit,record and debug a test. It is only available in Firefox extension. It includes entire selenium core whereas selenium grid is part of selenium suite which is used to run multiple test in multiple browser at a same time. For more information go to : what is selenium IDE

6. How to capture screenshot in selenium webdriver?

Taking screenshots as an evidence of successful test run or in case of failure is very important. This shows that the test case is passed or failed in a steps. This question need to be prepared as a testing interview automation question. Screenshots in selenium can be taken by typecasting web driver instance to TakeScreenshot. For more info check : Take Screenshot in selenium webdriver

7. What are major advantages of cucumber framework?

Cucumber uses BDD approach helps in building a bridge of communication between the IT developers and business or clients. There are many advantages of cucumber tool few of them are mentioned below:

  • Cucumber is open source which gains interest of business.
  • Communication gap between IT folks and business is reduced which helps in delivering quality applications.
  • It is written in plain English which make it easier for everyone to understand the scenario.
  • Automation scripts are easier to maintain as well.


We will be posting more QA automation interview questions in website soon.