Friday, November 28, 2014

The ultimate series of Software testing interview questions (Part 1)


Overview

As a specialist tester, I have a lot of knowledge and experience to share, among my activities you can find my blog, lectures, QA courses and consult. My activities help me to understand that some of the software testers (Both new and experienced) are always afraid of the next job interview.

There are many parameters and reasons that can explain this fear, but the basic one is that the interview questions for such job can be really challenging when the interviewer wants to examine the candidate technical and theoretical knowledge.

To help those people who afraid from their next job interview, I created this list of questions, that can help you to succeed in the future interview and reduce the stress that may cause unwanted failure.

I decided to provide answers to only a few questions (you can always contact me and I will provide the answer...), the reason is that I want you to think about the QA field and learn (remembering my answers is not the right way to work in this industry). 

In addition, you should know that all my answers are NOT highly details, the target here, is to provide directions and guidelines, further research is more than suggested.



SDLC model


Q1: Explain the term “SDLC”?

Answer: 
SDLC stands for Software Development Life Cycle. SDLC is a framework that describes the set of activities performed at every stage/phase of a software development project. 

Q2: Explain the benefits of using the SDLC model? 

Answer:

  • Provide a framework for the project (methodologies, activities…).
  • Provide greater visibility of the project progress.
  • Help the company to achieve and effectiveness:
-          Reduce the costs.
-          Reduce the development/testing timelines.
-          Increase the end product quality.
  • Reduce/remove the risks from the application development process.
  • Provide a dedicated mechanism for tracking the project progress.


Q3: what are the basic phased of the SDLC model? 

Answer:

  1. Understand and review the requirements.
  2. Design (System \Software) done based on the requirements.
  3. Coding based on the system design made in the second phase.
  4. Testing (You should know what happens next…).
  5. Deployment on customer environment.
  6. Maintenance (fixing the bugs that found in customers environment).


Theoretical QA questions

Q4: What is the purpose of “Entry” criteria? 


Answer: 

In its basic, entry criteria is the set of conditions that should be approved on each step of the SDLC model, for us the QA, the entry criteria are the basic terms that need to be fulfilled before the QA teams can start their test.

Q5: Can you provide a few examples that explain the “Entry” criteria? 

Answer: 

Few examples that relevant for this term:

  • All defects that relevant to the design stage are closed and verified by engineering.
  • The code is verified against a proper implementation of “Unit” testing.
  • The basic functionality of the software is ready for testing.
  • Available documentation that defines the requirements.
  • All testers are familiar with the software architecture.
  • All testers are familiar with the project targets.
  • The testing environment is ready to use.
  • Available build that approved for use.
  • Test plans/cases are approved.


Q6: What is the purpose of “Exit” criteria? 

Answer: 

Just like the ‘Entry’ criteria that starts the testing process, the ‘Exit’ criteria is the one that determines that the testing phase is done, and the application is ready for deployment (The next phase of the SDLC model).


Remember, Exit criteria:
If approved – the product is published to the company customers.
If declined - the product cannot be published to the company customers, the missing criteria must be approved.


Q7: Can you provide a few examples that explain the “Exit” criteria?

Answer: 
Few examples that relevant for this term:

  • All the predefined areas that marked as “Risk” are tested and the risk is removed.
  • All errors are highly documented and know for the stockholders.
  • All tests with high priority are executed and marked as “Pass”.
  • All requirements for the SRS documentation are tested.
  • STR is sent and approved by the project owner.
  • The application tested on architectures (A/B…).
  • No major/critical bugs are left open.
  • 90-95% of all tests are done.


Q8: What are the basic testing levels? 

Answer: 

Level 1: Unit testing
Level 2: Integration testing
Level 3: System testing
Level 4: Acceptance testing.
Level 5: Alpha/Beta testing

Q9: Explain Quality Assurance?

Answer
Quality Assurance is a layer of the SDLC model, this layer is executed with a set of activities that designed to prevent errors and to ensure that the software is built based on the predefined requirements and specifications (SRS documentation). The main target of QA is to improve both the testing and development process.

Note!
In some cases that the interviewer will ask you about the differences between QA/QC, the main difference is that QA improve the process and QC is the set of activities that ensure the product quality.


Q10: Define “Software Testing”?

Answer
Software testing is a process designed to execute software with predefined targets to find and remove software bugs. In addition, software testing involves two different processes called “Validation and Verification”.



Q11: what are the main targets of “Software Testing”?

Answer
The main target for software testing:

  • To ensure that the software cleared of bugs (you cannot get 100 coverage, but you should do your best to achieve the best testing matrix that ensures that obvious bugs are removed).
  • Ensure that the software meets the original requirements and specifications.
  • Provide confidence in the software (Customers, stockholders Etc.).

Q12: When should you START testing a software? 

Answer
Very simple answer… AS SOON AS YOU CAN!!!

  • When you start early, you can affect the software and raise your ideas, changing the design in the early stage will not cost the same as you change it in later stages.
  • You can start your tests before you get the actual software, this kind of tests called “Static” testing (See my blog article that explains this type of tests), that have really high benefits that reduce the bugs in the Dynamic stage of testing.

  • When you start early, each bug that discovered is cost less.

  • Early testing will provide greater knowledge for the testers (more involvements in the requirements/specification/business case Etc.)

  • Early the testing can raise the logical and technical problems on earlier stages, those problems will affect the software end design and costs.

  • Many bugs that found during the regular testing process (Dynamic section), could and should be reported on the Static part of testing.



Q13: When should you STOP testing a software?

Answer

  • Based on the testing coverage. 
  • Based on Risk Analysis.
    Management decision.
  • Testing Declines.


Q14: can you provide few examples for tools that may use to automate your tests?

Answer

  • In-house testing tools.
  • Testing Anywhere.
  • Test Complete.
  • Load Runner.
  • Win Runner.
  • Selenium.



Q15:  can you explain “Bug”/Defect”/”Error” in a software?

Answer

Any problem/fault in the software that’s causing the following behaviors:
-          The software crash or display invalid notifications.
-          The software provides invalid outputs.
-          The software failed to perform as expected (Any deviation from the expected results).

Sunday, November 9, 2014

UNIX basics for software testers

Overview

As a software tester, you need to be familiar with different operating systems, this guide will provide the basic list of commands that you need to know when working with UNIX based systems. 

The ‘ls’ command:

This command will help you to reveal the list of objects (files/folders) under a given folder.

Command
output
ls
This command will list all files/folders with names only

ls –l
This command will list all files/folders, with additional fields (name of object, permissions, size, owner and more).

ls –a
Display all objects, including the invisible files for “-a” switch

ls -F
Add special characteristics for file system objects(Folder/File) that identify is type ,Examples:
“/” – The object is a directory
“@” - The object is a symbolic link

ls *StringToSearch*
Will return all files that contain the requested string
Example :
Folder has two files : DavidTzemach.txt , DtVisionTech.ps1
Search query: ls *Tz*
Result : the returned value from this query will be a single file (DavidTzemach.txt)

ls Char*
List all files that Starts with the specified char

Example :
Folder has four files :
aFile.a |bFile.b | cFile.c |dFile.d

Search query: ls *a
Result : the returned value from this query will be a single file(aFile.a)

ls *Char
List all files that Ends with the specified char
Example :
Folder has four files :
aFile.a |bFile.b | cFile.c |dFile.d

Search query: ls c*
Result : the returned value from this query will be a single file (aFile.c)

ls *.String
List all files that Ends with the specified extension
Example :
Folder has four files :
File.txt |File.bat | File.doc |File.xls

Search query: ls *.bat
Result : the returned value from this query will be a single file(File.bat)

 

The ‘cd’ and ‘pwd’ commands:

This command will help you to navigate between different folder hierarchies (Root/Subdirectories…)
cd = Change Directory

Command
output
pwd
This command will print the current working directory (Staring from the mount export).

cd “Destination”
That’s the basic way to navigate between folders, the “Destination” folder can indicate for :
-          Sub Directory
-          New path
-          ETC.

Example :
pwd  =  /
cd test
pwd  =  /test
cd  /test//test1 /test2/test3//test4//test5
pwd = /test//test1 /test2/test3//test4//test5
Current working  location = test5

cd
cd ..
cd
Return to home folder

cd..
Return one level up
Example :
Current : /Root/Test/
Run : cd
Current : /Root

cd /
Return to root folder (“/”) that now becomes the working directory

Folders and Files – basic commands

This table contains a list of commands that can be used when you need to manipulate system objects

Creating new folders

Command
output
mkdir –help
Will open the command help menu

mkdir “NewFolder”
This command will create a subdirectory in your current working directory

Example :
Mkdir NewFolder = new folder is created with the specified name

Remove system objects


Command
output
rmdir “ObjectToRemove”
Remove EMPTY folders(in any case of existing objects(Folders, Files..), the operation results in a notification error)

rm





Remove Files/folders that contain objects (Folders, Files...)

Examples :

rm “File Name” – remove a specific file

rm – r “Object Name” = delete the object with all his content (Subdirectories/Files), each object removal should be approved.

rm Startswith* - delete all files that start with specific char/s

rm *EndsWith  - delete all files that ends with specific char/s


Rename System objects


Command
output
mv  FolderName  NewFolderName
Rename folder name

Example: mv  A B
Result : Folder A will rename to folder B
mv  FileName  NewFileName
Rename File name

Example: mv  F1 F2
Result : File F1 will rename to folder F2

Copy system objects


Command
output
cp  originalFile  new file
This command will copy an existing file(current directory) and clone it with a new file name

Example:
Directory Name: Test 1
Current files: Single file (original)
cp original tmpnew

Result:
Folder Test 1 will now have two files(original , tmpnew)
cp  originalFile  New destination
This command will copy an existing file(current directory) and clone it to a new folder, the file is created with the same name

Example:
Directory Name: Test 1
Current files: Single file (original)
cp original /destination/NewFileNmae

Result:
The “destination” Folder will now have the clone file(original)
cp  originalFile  New destination/NewName
This command will copy an existing file(current directory) and clone it to a new folder, the file is created with the new name that specified by the user

Example:
Directory Name: Test 1
Current files: Single file (original)
cp original /destination

Result:
The “destination” Folder will now have the clone file(original)
cp  *.End_Filename /destination
Will copy all files that end with the specified char/string
cp  Filename.* /destination
Will copy all files that Starts with the specified char/string
cp  folder name /cloned foldername
Will clone a directory to the current folder, the folder name is specified by the user
cp –r  A /B
Will copy folder A (recursively) and named it “B”, the new folder will created under the current folder location
cp –r  A /B –v
Same as previous command, but now the -v switch will add an additional information about the execution step
cp –r  A /B –u
Will copy files to a new destination folder, only if the files are missing OR with the older date from the source files

Moving System objects


Command
output
mv  FileName NewPath
Rename the file name on current directory name

Example: mv  A /TmpFolder
Result : File A will be moved to TmpFolder
mv  FileName NewPath/NewName
Rename the file name on current directory name

Example: mv  A /TmpFolder/AAA
Result : File A will be moved to TmpFolder with new name(AAA)

 

Managing files content


Command
output
cat File.txt
Will display the file content on screen
cat File.txt -n
Will display the file content on screen + line numbers
cat File.txt -b
Will display the file content on screen  + Unique id number per line (Empty lines are excluded)
cat /FileA > /folder/tmpfile.txt
Instead of printing the file content to the screen. All the data will be written totmpfile.txt
cat FileA >FileB
Will create new file(FileB) with the content of FileA
cat FileA /FileB
Will aggregated the data of fileA and FileB (Content will be available on the command line session).
cat >>FileA
In case you want to modify a specific file content
cat FileA FileB  >Content.txt
Will aggregated the data of fileA and FileB (Content will send to “Content” file).
cat BigFile | less
In case that you want to display files with very large content, you can use the “|”, this switch will help you to control the output in the screen.

The content can be controlled with few basic chars:

Space – display the next available lines
B – display the previous syntax
q -  quit

diff  fileA fileB
Display the content differences between two files

File Creation


Command
output
cat  file1
New file is created (file1), the user can add content.

Navigation keys:
Enter – new line
Ctrl+d – Save and Exit
Ctrl+c – Exit

 

How to Search content in file(less/grep)

Command
output
Option 1: less
Step 1 : less file.doc
Step 2 : /SearcCriteria

Option 2: grep
grep SearchCriteria file.txt








Option 1:
In step 1, we open the file and print the content to the screen
In step 2, we can enter the “Search” criteria

Option 2:
All lines that have the search criteria will be printed on screen

Additional and basic options:
-c  =  Total count of matched lines
-v  =  Display lines that doesn’t match the search criteria
-H  =  Matched lines, with the file name at the start

Help Commands


Command
output
whatis command_name
Short summary of the command
apropos keyword
Will list all available commands with this keyword
man command_name
Returns the manual page of the specified command

 

System processes

Command
output
ps - A
Select all processes with the unique process identifier(PID)
ps - e
Select all processes with the unique process identifier(PID)
ps -aux
Display all processes (All Users)
ps –p [process ID]
Select a single process based on the searched ID
ps – A --forest
List all process in the hierarchy
top
Display the system statistics and number of executions

 

General Commands


Command
output
clear
This command will remove all text from the command screen
exit
Close connection session

Environmental Commands


Command
output
uptime
All the date and time information since the machine is in running state
hostname
The server hostname
date
Display the machine currently date
cal
Display the machine calendar
df
Display the space left per volume
arch
Display the server architecture
who
who –b
Display all the current connected users
Display the system last reboot time


My Presentations