2022 - All About Testing 2022

What is the recipe for successful achievement?

To my mind there are just four essential ingredients: Choose a career you love, give it the best there is in you, seize your opportunities, and be a member of the team.

“All our dreams can come true, if we have the courage to pursue them.”

“I’m a great believer in luck, and I find the harder I work, the more I have of it.”

Success unshared is failure.

To make our way, we must have firm resolve, persistence, tenacity. We must gear ourselves to work hard all the way. We can never let up.

"Everyone you will ever meet knows something you don't."

he fact that I can plant a seed and it becomes a flower, share a bit of knowledge and it becomes another's, smile at someone and receive a smile in return, are to me continual spiritual exercises.

The secret of success is to do the common things uncommonly well.

Good things come to people who wait, but better things come to those who go out and get them.

Tuesday 19 July 2022

Automation Testing Interview Questions

Java-Basic

1. Types of polymorphism
2. Difference between override and overload
3. Methods that cannot be overloaded
4. Static block and instance block
5. Difference in Static and non static
6. Encapsulation and common use cases
7. Abstract vs interfaces
8. Inheritance in java
9. Methods that cannot be overloaded
10. Type casting in java
11. String buffer and string builder
12. Why string is immutable in java
13. How to handle exceptions
14. Can I write try catch without the catch block
15. Difference between throws and throw
16. Use of iterator in java
17. Difference in Final, finally and finalize 
18. Boxing and unboxing in java
19. Increment and decrement operation
20. Variable Args
21. This and super keyword in java
22. Issues during Swtich case without break
23. Upcasting and downcasting
24. Baseclass of all class in java
25. Baseclass of error and exceptions
26. Access specifiers
27. Continue and break statement
28. Can main method return any value
29. Can we overload main method. What happens when overloaded
30.how to execute and statement before main method
31. Difference between == and equals()
32. Can user declare constructor as final
33. Can we cast any other type to Boolean data with type casting.
34.does java compile if user use 'static public void' instead of 'public static void'
35.can we use this() and super() in a constructor
36. Can we create object of abstract class
37. Can we create reference for an abstract class
38. Can we declare a class as static
39. What is instanceOf keyword
40. What's the load factor of HashMap
41. How to prevent a class from being sub classes
42. Final variable, final method and final class
43. Ways to create a string variable.
44. What is gc() - garbage collector
45. Subclass and innerclass
46. Infinite loop in java
47. How to make copy of an element
48. Checked and unchecked exceptions

Java Collection

1. Classes inside List interface, Set interface, Map Interface
2. Arraylist vs Linkedlist
3. Arraylist vs array
4. Arraylist vs vector or stack
5. Which class of List Interface to be used if user have more insertions and deletions
6. Which class of List Interface to be used if user have more retrieval
7. Set Interface: HashSet, TreeSet, SortedSet
8. Map - HashMap, HashTable, TreeMap, LinkedHashMap.
9. Stack and Queue
10. How to maintain insertion order in Set, List and Map
11. How to sort elements in ascending order in Set and Map

Java Programs

1. String reverse
2. String Palindrome
3. String Anagram
4. Find occurrences of characters in a string
5. Find the count of Capital and Small letters in a string
6. Remove duplicate characters from string
7. Swap to numbers without temporary variable
8. Reverse number
9. factorial
10. Fibonacci
11. Count number, alphabet and special characters

Accenture Selenium Java Automation Testing Interview Questions

1. Tell me about your self

2. Explain your framework

3. What is BDD

4. What is cucumber and explained with example using Given, Whn, Then & AND

5. What is the language name of cucumber steps

6. Explain TestNG

7. What are the annotations order

8. How to achieve parallel execution using test NG

9. What are the listeners and how it works

10. Syntax of listeners in selenium

11. What are the expected things in test execution reports using selenium automation

12. What is synchronisation

13. Explain wait in selenium and their syntax

14. How to handle drop-down

15. Explain data reading code from Excel file.

16. What is exception when data does not received from excel file 

17. Explain oops concepts

18. What is difference between Abstract and Interface

19. What is inheritance how to achieve it. Explain with one example.

20. What is list, set and Hash Map. Give one difference between each.

21. What is the web elements. What is xpath and css. Which is faster between them.

22. Which path you have used most in your project and why 

23. What is DOM.

24. What is use of final and finalize keywords.

25. Explain difference between Abstract class and Abstract method.

26. What are the access modifiers. Why we need access modifiers and where you have used in your project.

27. Can you explain Java string and their methods.

28. What is exception and how to handle it.

29. Can we use multiple try catch block in a single class.

UNIX Knowledge For Software Testers

What is UNIX?
UNIX is an operating system which was first developed in the 1960s, and has been under constant development ever since. By operating system, we mean the suite of programs which make the computer work. It is a stable, multi-user, multi-tasking system for servers, desktops and laptops.

UNIX Systems also have a graphical user interface (GUI) similar to Microsoft Windows which provides an easy to use environment. However, knowledge of UNIX is required for operations which aren’t covered by a graphical program, or for when there is no windows interface available, for example, in a telnet session.

Types of UNIX
There are many different versions of UNIX, although they share common similarities. The most popular varieties of UNIX are Sun Solaris, GNU/Linux, and MacOS X.

The UNIX Operating System
The UNIX operating system is made up of three parts; the kernel, the shell and the programs.

The kernel
The kernel of UNIX is the hub of the operating system: it allocates time and memory to programs and handles the filestore and communications in response to system calls.
As an illustration of the way that the shell and the kernel work together, suppose a user types rm myfile (which has the effect of removing the file myfile). The shell searches the filestore for the file containing the program rm, and then requests the kernel, through system calls, to execute the program rm on myfile. When the process rm myfile has finished running, the shell then returns the UNIX prompt % to the user, indicating that it is waiting for further commands.

The shell
The shell acts as an interface between the user and the kernel. When a user logs in, the login program checks the username and password, and then starts another program called the shell. The shell is a command line interpreter (CLI). It interprets the commands the user types in and arranges for them to be carried out. The commands are themselves programs: when they terminate, the shell gives the user another prompt (% on our systems).

The adept user can customise his/her own shell, and users can use different shells on the same machine. Staff and students in the school have the tcsh shell by default.
The tcsh shell has certain features to help the user inputting commands.
Filename Completion – By typing part of the name of a command, filename or directory and pressing the [Tab] key, the tcsh shell will complete the rest of the name automatically. If the shell finds more than one name beginning with those letters you have typed, it will beep, prompting you to type a few more letters before pressing the tab key again.
History – The shell keeps a list of the commands you have typed in. If you need to repeat a command, use the cursor keys to scroll up and down the list or type history for a list of previous commands.
Files and processes
Everything in UNIX is either a file or a process.
A process is an executing program identified by a unique PID (process identifier).
A file is a collection of data. They are created by users using text editors, running compilers etc.
Examples of files:
a document (report, essay etc.)
the text of a program written in some high-level programming language
instructions comprehensible directly to the machine and incomprehensible to a casual user, for example, a collection of binary digits (an executable or binary file);
a directory, containing information about its contents, which may be a mixture of other directories (subdirectories) and ordinary files.
The Directory Structure
All the files are grouped together in the directory structure. The file-system is arranged in a hierarchical structure, like an inverted tree. The top of the hierarchy is traditionally called root (written as a slash / )
UNIX Knowledge For Software Testers

UNIX OS Knowledge for Software Testers

UNIX Commands
Contents
cat — for creating and displaying short files
chmod — change permissions
cd — change directory
cp — for copying files
date — display date
echo — echo argument
ftp — connect to a remote machine to download or upload files
grep — search file
head — display first part of file
ls — see what files you have
lpr — standard print command (see also print )
more — use to read files
mkdir — create directory
mv — for moving and renaming files
ncftp — especially good for downloading files via anonymous ftp.
print — custom print command (see also lpr )
pwd — find out what directory you are in
rm — remove a file
rmdir — remove directory
rsh — remote shell
setenv — set an environment variable
sort — sort file
tail — display last part of file
tar — create an archive, add or extract files
telnet — log in to another machine
wc — count characters, words, lines
—————————————-—————————————-—————————————-
cat
This is one of the most flexible Unix commands. We can use to create, view and concatenate files. For our first example we create a three-item English-Spanish dictionary in a file called “dict.”
% cat >dict
red rojo
green verde
blue azul
<control-D>
%
<control-D> stands for “hold the control key down, then tap ‘d'”. The symbol > tells the computer that what is typed is to be put into the file dict. To view a file we use cat in a different way:
% cat dict
red rojo
green verde
blue azul
%
If we wish to add text to an existing file we do this:
% cat >>dict
white blanco
black negro
<control-D>
%
Now suppose that we have another file tmp that looks like this:
% cat tmp
cat gato
dog perro
%
Then we can join dict and tmp like this:
% cat dict tmp >dict2
We could check the number of lines in the new file like this:
% wc -l dict2
8
The command wc counts things — the number of characters, words, and line in a file.
—————————————-—————————————-—————————————-
chmod
This command is used to change the permissions of a file or directory. For example to make a file essay.001 readable by everyone, we do this:
% chmod a+r essay.001
To make a file, e.g., a shell script mycommand executable, we do this
% chmod +x mycommand
Now we can run mycommand as a command.
To check the permissions of a file, use ls -l . For more information on chmod, use man chmod.
—————————————-—————————————-—————————————-
cd
Use cd to change directory. Use pwd to see what directory you are in.
% cd english
% pwd
% /u/ma/jeremy/english
% ls
novel poems
% cd novel
% pwd
% /u/ma/jeremy/english/novel
% ls
ch1 ch2 ch3 journal scrapbook
% cd ..
% pwd
% /u/ma/jeremy/english
% cd poems
% cd
% /u/ma/jeremy
Jeremy began in his home directory, then went to his english subdirectory. He listed this directory using ls , found that it contained two entries, both of which happen to be diretories. He cd’d to the diretory novel, and found that he had gotten only as far as chapter 3 in his writing. Then he used cd .. to jump back one level. If had wanted to jump back one level, then go to poems he could have said cd ../poems. Finally he used cd with no argument to jump back to his home directory.
—————————————-—————————————-—————————————-
cp
Use cp to copy files or directories.
% cp foo foo.2
This makes a copy of the file foo.
% cp ~/poems/jabber .
This copies the file jabber in the directory poems to the current directory. The symbol “.” stands for the current directory. The symbol “~” stands for the home directory.
—————————————-—————————————-—————————————-
date
Use this command to check the date and time.
% date
Fri Jan 6 08:52:42 MST 1995
—————————————-—————————————-—————————————-
echo
The echo command echoes its arguments. Here are some examples:
% echo this
this
% echo $EDITOR
/usr/local/bin/emacs
% echo $PRINTER
b129lab1
Things like PRINTER are so-called environment variables. This one stores the name of the default printer — the one that print jobs will go to unless you take some action to change things. The dollar sign before an environment variable is needed to get the value in the variable. Try the following to verify this:
% echo PRINTER
PRINTER
—————————————-—————————————-—————————————-
ftp
Use ftp to connect to a remote machine, then upload or download files. See also: ncftp
Example 1: We’ll connect to the machine fubar.net, then change director to mystuff, then download the file homework11:
% ftp solitude
Connected to fubar.net.
220 fubar.net FTP server (Version wu-2.4(11) Mon Apr 18 17:26:33 MDT 1994) ready.
Name (solitude:carlson): jeremy
331 Password required for jeremy.
Password:
230 User jeremy logged in.
ftp> cd mystuff
250 CWD command successful.
ftp> get homework11
ftp> quit
Example 2: We’ll connect to the machine fubar.net, then change director to mystuff, then upload the file collected-letters:
% ftp solitude
Connected to fubar.net.
220 fubar.net FTP server (Version wu-2.4(11) Mon Apr 18 17:26:33 MDT 1994) ready.
Name (solitude:carlson): jeremy
331 Password required for jeremy.
Password:
230 User jeremy logged in.
ftp> cd mystuff
250 CWD command successful.
ftp> put collected-letters
ftp> quit
The ftp program sends files in ascii (text) format unless you specify binary mode:
ftp> binary
ftp> put foo
ftp> ascii
ftp> get bar
The file foo was transferred in binary mode, the file bar was transferred in ascii mode.
—————————————-—————————————-—————————————-
grep
Use this command to search for information in a file or files. For example, suppose that we have a file dict whose contents are
red rojo
green verde
blue azul
white blanco
black negro
Then we can look up items in our file like this;
% grep red dict
red rojo
% grep blanco dict
white blanco
% grep brown dict
%
Notice that no output was returned by grep brown. This is because “brown” is not in our dictionary file.
Grep can also be combined with other commands. For example, if one had a file of phone numbers named “ph”, one entry per line, then the following command would give an alphabetical list of all persons whose name contains the string “Fred”.
% grep Fred ph | sort
Alpha, Fred: 333-6565
Beta, Freddie: 656-0099
Frederickson, Molly: 444-0981
Gamma, Fred-George: 111-7676
Zeta, Frederick: 431-0987
The symbol “|” is called “pipe.” It pipes the output of the grep command into the input of the sort command.
For more information on grep, consult
% man grep
—————————————-—————————————-—————————————-
head
Use this command to look at the head of a file. For example,
% head essay.001
displays the first 10 lines of the file essay.001 To see a specific number of lines, do this:
% head -n 20 essay.001
This displays the first 20 lines of the file.
—————————————-—————————————-—————————————-
ls
Use ls to see what files you have. Your files are kept in something called a directory.
% ls
foo letter2
foobar letter3
letter1 maple-assignment1
%
Note that you have six files. There are some useful variants of the ls command:
% ls l*
letter1 letter2 letter3
%
Note what happened: all the files whose name begins with “l” are listed. The asterisk (*) is the ” wildcard” character. It matches any string.
—————————————-—————————————-—————————————-
lpr
This is the standard Unix command for printing a file. It stands for the ancient “line printer.” See
% man lpr
for information on how it works. See print for information on our local intelligent print command.
—————————————-—————————————-—————————————-
mkdir
Use this command to create a directory.
% mkdir essays
To get “into” this directory, do
% cd essays
To see what files are in essays, do this:
% ls
There shouldn’t be any files there yet, since you just made it. To create files, see cat or emacs.
—————————————-—————————————-—————————————-
more
More is a command used to read text files. For example, we could do this:
% more poems
The effect of this to let you read the file “poems “. It probably will not fit in one screen, so you need to know how to “turn pages”. Here are the basic commands:
q — quit more
spacebar — read next page
return key — read next line
b — go back one page
For still more information, use the command man more.
—————————————-—————————————-—————————————-
mv
Use this command to change the name of file and directories.
% mv foo foobar
The file that was named foo is now named foobar
—————————————-—————————————-—————————————-
ncftp
Use ncftp for anonymous ftp — that means you don’t have to have a password.
% ncftp ftp.fubar.net
Connected to ftp.fubar.net
> get jokes.txt
The file jokes.txt is downloaded from the machine ftp.fubar.net.
—————————————-—————————————-—————————————-
print
This is a moderately intelligent print command.
% print foo
% print notes.ps
% print manuscript.dvi
In each case print does the right thing, regardless of whether the file is a text file (like foo ), a postcript file (like notes.ps, or a dvi file (like manuscript.dvi. In these examples the file is printed on the default printer. To see what this is, do
% print
and read the message displayed. To print on a specific printer, do this:
% print foo jwb321
% print notes.ps jwb321
% print manuscript.dvi jwb321
To change the default printer, do this:
% setenv PRINTER jwb321
—————————————-—————————————-—————————————-
pwd
Use this command to find out what directory you are working in.
% pwd
/u/ma/jeremy
% cd homework
% pwd
/u/ma/jeremy/homework
% ls
assign-1 assign-2 assign-3
% cd
% pwd
/u/ma/jeremy
%
Jeremy began by working in his “home” directory. Then he cd ‘d into his homework subdirectory. Cd means ” change directory”. He used pwd to check to make sure he was in the right place, then used ls to see if all his homework files were there. (They were). Then he cd’d back to his home directory.
—————————————-—————————————-—————————————-
rm
Use rm to remove files from your directory.
% rm foo
remove foo? y
% rm letter*
remove letter1? y
remove letter2? y
remove letter3? n
%
The first command removed a single file. The second command was intended to remove all files beginning with the string “letter.” However, our user (Jeremy?) decided not to remove letter3.
—————————————-—————————————-—————————————-
rmdir
Use this command to remove a directory. For example, to remove a directory called “essays”, do this:
% rmdir essays
A directory must be empty before it can be removed. To empty a directory, use rm.
—————————————-—————————————-—————————————-
rsh
Use this command if you want to work on a computer different from the one you are currently working on. One reason to do this is that the remote machine might be faster. For example, the command
% rsh solitude
connects you to the machine solitude. This is one of our public workstations and is fairly fast.
See also: telnet
setenv
% echo $PRINTER
labprinter
% setenv PRINTER myprinter
% echo $PRINTER
myprinter
—————————————-—————————————-—————————————-
sort
Use this command to sort a file. For example, suppose we have a file dict with contents
red rojo
green verde
blue azul
white blanco
black negro
Then we can do this:
% sort dict
black negro
blue azul
green verde
red rojo
white blanco
Here the output of sort went to the screen. To store the output in file we do this:
% sort dict >dict.sorted
You can check the contents of the file dict.sorted using cat , more , or emacs .
—————————————-—————————————-—————————————-
tail
Use this command to look at the tail of a file. For example,
% tail essay.001
displays the last 10 lines of the file essay.001 To see a specific number of lines, do this:
% tail -n 20 essay.001
This displays the last 20 lines of the file.
—————————————-—————————————-—————————————-
tar
Use create compressed archives of directories and files, and also to extract directories and files from an archive. Example:
% tar -tvzf foo.tar.gz
displays the file names in the compressed archive foo.tar.gz while
% tar -xvzf foo.tar.gz
extracts the files.
—————————————-—————————————-—————————————-
telnet
Use this command to log in to another machine from the machine you are currently working on. For example, to log in to the machine “solitude”, do this:
% telnet solitude
See also: rsh.
—————————————-—————————————-—————————————-
wc
Use this command to count the number of characters, words, and lines in a file. Suppose, for example, that we have a file dict with contents
red rojo
green verde
blue azul
white blanco
black negro
Then we can do this
% wc dict
5 10 56 tmp
This shows that dict has 5 lines, 10 words, and 56 characters.
The word count command has several options, as illustrated below:
% wc -l dict
5 tmp
% wc -w dict
10 tmp
% wc -c dict
56 tmp

Thursday 28 April 2022

Test Cases for an ATM Machine - All about testing

Thursday 17 March 2022

Accenture Selenium Java Automation Testing Interview Questions

1. Tell me about your self

2. Explain your framework

3. What is BDD?

4. What is cucumber and explained with example using Given, Whn, Then & AND?

5. What is the language name of cucumber steps?

6. Explain TestNG

7. What are the annotations order?

8. How to achieve parallel execution using test NG?

9. What are the listeners and how it works?

10. Syntax of listeners in selenium

11. What are the expected things in test execution reports using selenium automation ?

12. What is synchronisation ?

13. Explain wait in selenium and their syntax ?

14. How to handle drop-down ?

15. Explain data reading code from Excel file.

16. What is exception when data does not received from excel file  ?

17. Explain oops concepts

18. What is difference between Abstract and Interface ?

19. What is inheritance how to achieve it. Explain with one example ?

20. What is list, set and Hash Map. Give one difference between each ?

21. What is the web elements. What is xpath and css. Which is faster between them ?

22. Which path you have used most in your project and why ?

23. What is DOM ?

24. What is use of final and finalize keywords ?

25. Explain difference between Abstract class and Abstract method.

26. What are the access modifiers. Why we need access modifiers and where you have used in your project ?

27. Can you explain Java string and their methods. ?

28. What is exception and how to handle it. ?

28. Can we use multiple try catch block in a single class. ?

Wednesday 16 March 2022

Interview Questions on Ecommerce Domain

1. What is a Web Portal and give some examples?

The web portal is a business gateway ex: online shopping portals and http://www.naukri.com/ like job portals

2. What are the Types of Ecommerce Applications available in the IT Industry?

Business to Business (B2B)

Business to Consumer (B2C)

Consumer to Consumer (C2C)

Consumer to Business (C2B)

Etc…

3. What are two advantages of Electronic Commerce over Traditional Commerce?

The advantages of electronic commerce over traditional commerce are as follows:

1. Instant worldwide availability.

2. A streamlined buyer-to-seller relationship.

3. Reduced paperwork.

4. Reduced errors.

5. Time and overhead costs.

6. Reduced time to complete transactions.

7. Easier entry into new markets.

8. New business opportunities.

9. Improved market analysis.

10. Wider access to assistance and advice.

11. Improved product analysis.

12. The ability to streamline and automate purchasing.

Ecommerce Domain

4. How Testing is crucial in ECommerce?

Testing is crucial to e-commerce because e-commerce sites are both business-critical and highly visible to their users; any failure can be immediately expensive in terms of lost revenue and even more expensive in the longer term if disaffected users seek alternative sites. Yet the time pressures in the e-commerce world militate against the thorough testing usually associated with business criticality, so a new approach is needed to enable testing to be integrated into the development process and to ensure that testing does not present a significant time burden.

5. How to test Payment Gateways in Web Portals?

Using dummy card ids, we can test Payment Gateways.

6. What is Online Shopping Application and give some examples?

Online Shopping Application provides a business gateway between Product vendors and Customers.

Ex: Walmart, Amazon, etc…

7. What is the difference between business-to-business and business-to-consumer Electronic Commerce?

Difference between business-to-business and business-to-consumer e-commerce:

Business-to-business electronic commerce is conducted between two separate businesses, such as a large company needing office supplies and an office supply company. Business-to-consumer electronic commerce is between one individual and a company selling goods or services.

8. What are the possible drawbacks of Electronic Commerce?

Increased vulnerability to fraud; difficulty protecting intellectual property; risks to confidentiality; problems over taxation; customs requirements; regulations; credit card fraud; security; trust problems, and constant availability.

9. What are the payment models for Electronic Commerce?

The e-cash model, the check model, and the credit model.

10. How does Web marketing create a more personalized approach than radio or television advertising?

By allowing users to select the ads they would like to pursue; in radio and television advertising, the viewer or listener is more of a passive recipient of the information.

11. How to Set up an ECommerce System?

E-commerce Web sites are not easy to set up. With a plethora of e-commerce solutions in the market, entrepreneurs have to make a few key decisions:

• The entrepreneur has to decide on the initial amount of investment required for an e-commerce Web site, as well as the volume of business of an e-commerce Web site over the Internet. Investment factors and business objectives dictate the type of software, database, or other applications that are required to set up the e-commerce Web site.

• There are specific elements involved in an e-commerce system. These elements range from domain name for the site to the merchant account for e-commerce transactions. Each of these elements requires a certain amount of scrutiny before setting up an e-commerce Web site.

• Before launching the e-commerce Web site on the Internet, it requires rigorous testing. Some of the important and common types of testing include security testing, software and hardware reliability, and compatibility between all the elements of the system.

12. What is Software Reliability in ECommerce?

E-commerce requires software that performs critical tasks, such as creating a storefront and a shopping cart, collecting customer data, and providing the payment gateway. This software needs to function correctly.

Testing assures the organization of the quality and integrity of the e-commerce solution.

13. What is System Assurance in Ecommerce?

The main purpose of system assurance is to deliver a quality product. Conformance to requirements increases the organization’s confidence in the system.

An e-commerce system deals with three parties: the bank, the transaction clearinghouse, and the customer. The interdependency of these three parties makes the process of buying and selling over the Internet more critical than in real life. If the faith of any of these parties dwindles in the e-commerce site, the entrepreneurs can lose a lot of money, as well as their reputation.

For example, in the case of a faulty e-commerce system, the credit card of the customer may be billed immediately for the complete order, when only a partial order has been filled. Testing must assure that partial order fulfillment and billing are done correctly.