14
Basic Unix/Linux 1 E 2 Series Software Testing Interview Prep

Basic Unix/Linux 1 - SEED Infotech Ltd · PDF fileBasic Unix/Linux 1 E2 ... Examples are database applications developed in Visual Basic, Power Builder ... is a set of SQL commands

Embed Size (px)

Citation preview

Page 1: Basic Unix/Linux 1 - SEED Infotech Ltd · PDF fileBasic Unix/Linux 1 E2 ... Examples are database applications developed in Visual Basic, Power Builder ... is a set of SQL commands

Basic Unix/Linux 1

E2 Series Software Testing Interview Prep

Page 2: Basic Unix/Linux 1 - SEED Infotech Ltd · PDF fileBasic Unix/Linux 1 E2 ... Examples are database applications developed in Visual Basic, Power Builder ... is a set of SQL commands

Programming Fundamentals and Concepts 2

Software Testing Interview Prep E2 Series

1. What is the difference between web application and client server application?

Client server application is designed typically to work in a Local Area Network (LAN) environment using a proprietary protocol between client and server. Examples are database applications developed in Visual Basic, Power Builder etc. They are typically 2-tier applications. Visual Basic program acts as a client and Oracle or SQL Server acts as a server.

Web based application uses HTTP protocol to communicate between the client i.e. web browser and the web server. It can be hosted on the internet so that it can be accessed from anywhere in the world. Typically, web applications have minimum 3 tiers namely client (web browser), web Server and database server.

2. What is the difference between authentication and authorization? Give an example.

Authentication is a process of ascertaining user identity through his / her credentials like password. Authorization is a process of granting access to certain resources in the application to an authenticated user.

Login to the system with password is an example of authentication whereas having access to certain folders is authorization.

3. What is multiprocessing and multithreading?

Multiprocessing - Here multiple processes are executed simultaneously and they have their own accessible memory area called address space. When you open multiple programs like Microsoft Word, Microsoft Excel or any other program simultaneously, all of these run as processes.

Multithreading - Here multiple threads are running simultaneously which are parts of the same process and share the process address space. For example, when you open Microsoft Word program it is a process and a spell checker runs as a thread inside this process.

Page 3: Basic Unix/Linux 1 - SEED Infotech Ltd · PDF fileBasic Unix/Linux 1 E2 ... Examples are database applications developed in Visual Basic, Power Builder ... is a set of SQL commands

Basic Unix/Linux 3

E2 Series Software Testing Interview Prep

1. Which command is used to change permission in UNIX?

Here is an example of use of chmod command

chmod 664 <filename>

read and write to owner and group , read only to others

Chmod a+r, ug+w <filename>

read and write to owner and group , read only to others

2. How would you seek help for a particular Linux command?

whatis <command> displays short description of a command

<command> -- help displays usage summary and argument list

man <command> shows manual pages

info <command> similar to man command. Output is structured like web site.

3. Write a command to display current directory.

pwd 4. How do you find out your own username?

whoami/who am i

5. Which command is used to terminate a process?

kill

6. How will you run a program which requires root privileges without logging in as root?

When there is such a requirement, administrator has to configure the current user so that he/she can run the command in this fashion. Once it is done, the current user runs a command which needs root privileges as follows

sudo <command>

Page 4: Basic Unix/Linux 1 - SEED Infotech Ltd · PDF fileBasic Unix/Linux 1 E2 ... Examples are database applications developed in Visual Basic, Power Builder ... is a set of SQL commands

Database Management System and SQL 4

E2 Series Software Testing Interview Prep

1. What are the features of a primary key in databases?

Features of a primary key :

• It is unique.

• It cannot be NULL.

• It can be composite. i.e. can contain values from more than one columns.

2. What is the difference between DDL and DML?

SQL has three sub parts.

a) Data Definition Language (DDL) is a set of SQL commands used to create or modify and delete database structures or objects such as tables, views etc. and not actual data.

Examples of DDL commands are CREATE, ALTER, DROP.

b) Data Manipulation Language (DML) is a set of SQL commands which are used to query, insert, update, and delete data stored in the database.

Examples of DML commands are SELECT, INSERT, UPDATE, DELETE.

c) Data Control Language (DCL) is a set of commands for controlling access to the data.

Examples of DCL commands are GRANT, REVOKE.

3. What is normalization?

Normalization is a process used for designing table structures in an RDBMS to reduce redundant data. Data from a single table is replaced by distributing the same data in multiple tables to avoid duplication. It helps eliminate redundant data and formulate sensible data dependencies i.e. storing only related data in a table.

Page 5: Basic Unix/Linux 1 - SEED Infotech Ltd · PDF fileBasic Unix/Linux 1 E2 ... Examples are database applications developed in Visual Basic, Power Builder ... is a set of SQL commands

Testing Techniques 5

E2 Series Software Testing Interview Prep

4. What are constraints?

Constraints are the rules which are used as a part of creation of database objects like tables to restrict the type of data that can be stored in such tables. They are used to maintain data integrity and to enforce business rules. Constraints are enforced while inserting, updating or deleting the data.

Some examples of constraints are

Constraint Usage

NULL The column can contain NULL value.

NOT NULL The column cannot contain NULL value.

UNIQUE Column should have unique values i.e. duplicates are not allowed.

PRIMARY KEY Used to define primary key.

FOREIGN KEY Used to define foreign key.

5. What are stored procedures?

Stored procedure, by definition, is a segment of code which contains declarative or procedural SQL statements. It overcomes limitations of SQL. SQL has following limitations:

• SQL is a non-procedural language.

• SQL does not allow usage of variables and constants.

• Developer cannot control the flow of execution using SQL.

• SQL does not have ability to process data row by row in a loop.

6. What are views?

View is a logical or virtual table, based on a table or another view. View does not have its own data but shows data from the base tables. Views can be used to present relevant data from the same table to different users in different formats (view).

Page 6: Basic Unix/Linux 1 - SEED Infotech Ltd · PDF fileBasic Unix/Linux 1 E2 ... Examples are database applications developed in Visual Basic, Power Builder ... is a set of SQL commands

Testing Techniques 6

E2 Series Software Testing Interview Prep

1. What is cyclomatic complexity?

Cyclomatic complexity metric is used to measure logical complexity of a program. It has been developed by Tomas McCabe. Cyclomatic complexity defines the number of linearly independent paths through the source code. This is a maximum limit for the number of tests that must be conducted to ensure that all the statements are executed at least once.

2. What is static testing?

Static testing is reviewing the artifacts rather than actually executing the code. It mainly involves different kinds of reviews. Example of static testing is walkthrough.

Most common static tests are code reviews and inspections. Automation tools like JTest and Cpp-Test help automation of code analysis.

3. What is dynamic testing?

Dynamic testing is testing performed by executing the code by giving inputs and verifying the output.

4. What are the types of testing?

There are two types of testing. Static testing is done without executing the code.

Dynamic testing is done with code execution.

Page 7: Basic Unix/Linux 1 - SEED Infotech Ltd · PDF fileBasic Unix/Linux 1 E2 ... Examples are database applications developed in Visual Basic, Power Builder ... is a set of SQL commands

Testing Techniques 7

E2 Series Software Testing Interview Prep

5. What is debugging?

Debugging is done by a developer with the objective of finding and fixing the bugs before the code is released to the tester. It is the process of locating the defect, fixing it and re-testing. It is also called as fault-localization.

Testers also perform debugging while creating automation test scripts.

6. What is the difference between unit testing and debugging?

Though debugging and unit testing both are performed by developers, there is a difference in the objectives of each. Debugging is done to prove the code works. Here, developer takes help of step by step execution, break points etc. In case of unit testing, developer behaves more like a tester and tries to find out ways in which the code will fail and then corrects it.

7. What is the difference between testing and debugging?

Testing can and should be planned, designed and scheduled unlike debugging. Testing is done for known conditions whereas in debugging conditions are not known fully as the program or script is under development.

8. What is a Walkthrough? How is it done?

Walk through is a process where the programmer/author who has written the code formally presents (walks through) it to a small group of programmers.

9. Tell me something about peer review.

Peer review is a review held with the programmer who has written the code and one or two other programmers or testers acting as reviewers. In agile methodology, this is one of the important steps, it is called code swapping.

Page 8: Basic Unix/Linux 1 - SEED Infotech Ltd · PDF fileBasic Unix/Linux 1 E2 ... Examples are database applications developed in Visual Basic, Power Builder ... is a set of SQL commands

Testing Techniques 8

Software Testing Interview Prep E2 Series

10. What are drivers?

Driver is a program designed as a dummy calling module for lower level components/modules. Eventually, it is replaced when the actual module is ready. It is used in bottom up integration testing.

11. What is the difference between top down and bottom up approach of integration testing?

Top down integration Bottom up integration

Integration by moving up the control hierarchy

Integration by moving down the control hierarchy

Dummy modules called stubs are created to simulate not-yet-ready components at the lower level

Dummy modules called drivers are created to simulate not-yet-ready components at the higher level

Verifies major control or decision points early

Low level components are combined in a cluster and cluster is tested. Lesser overhead of creating dummy drivers

12. Why is big bang not a good method?

In big bang approach all components are combined and program is tested as a whole. Here errors are difficult to correct because isolation of causes is complicated by the vast expanse of entire program. For any fixes applied, there is a high risk of injections of more bugs in a looping fashion.

Page 9: Basic Unix/Linux 1 - SEED Infotech Ltd · PDF fileBasic Unix/Linux 1 E2 ... Examples are database applications developed in Visual Basic, Power Builder ... is a set of SQL commands

Test Design 9

E2 Series Software Testing Interview Prep

1. State some common mistakes done while writing test cases.

Common mistakes in test case writing are as follows

• Making cases too long or verbose

• Incomplete and incorrect

• Skipping a step

• Unclear way of specifying actions

• Failure to clean up

• Names or fields used are not consistent with the current source code under test

2. How do you write test cases?

Following are the typical steps for creating test cases

• Identify test resources

• Identify conditions to be tested using test matrix

• Prioritize the test conditions

• Select conditions for testing/pre-requisites

• Determine correct results of processing

• Create test cases

• Document test conditions

3. Create test cases on a bottle.

Functional

• Check if the bottle holds designed volume of liquid.

• Check if the cap fits properly.

• Check if there is any leakage.

Usability

• Check if it is light weight so that it can be carried easily.

• Check if cap is easy to remove.

• Check if it breaks easily after falling down.

• Check if it is made of transparent material so that contents are visible.

Page 10: Basic Unix/Linux 1 - SEED Infotech Ltd · PDF fileBasic Unix/Linux 1 E2 ... Examples are database applications developed in Visual Basic, Power Builder ... is a set of SQL commands

Performance Testing 10

E2 Series Software Testing Interview Prep

1. What is load testing?

Load testing is generally referred to as observing performance of the application for a pre-defined load. This load could be in the form of simulated multiple concurrent users or I/O operations. Using various tools, load is generated and performance of the system is monitored. Tools generally work at protocol level and tend to uncover performance bottleneck in the areas of OS, network, database etc.

2. List some popular load testing tools.

OpenSTA, Rational Performance Tester (RPT), JMeter, SilkPerformer, LoadRunner

3. What is stress testing? Explain with example.

In stress testing system is subjected to a load that causes it to allocate resources to the maximum amount. The goal is try to break the system to find out the condition at which the system will crash.

Since hardware and software interactions are stretched to a limit, stress testing is likely to reveal the defects and design flaws like deadlocks, race conditions, shortage of resources etc. which would not be apparent in the normal conditions of testing.

4. What is the difference between load and stress testing?

In load testing, system performance is monitored for a pre-defined load whereas in stress testing, system is subjected to the load beyond operational requirements till it crashes.

Page 11: Basic Unix/Linux 1 - SEED Infotech Ltd · PDF fileBasic Unix/Linux 1 E2 ... Examples are database applications developed in Visual Basic, Power Builder ... is a set of SQL commands

Test Automation 11

E2 Series Software Testing Interview Prep

1. How do you report defects?

Defects are reported using a defect management tool like BugZilla. When one finds a bug in the software, he enters the details related to the defect like module name, description, type, priority and severity etc. From these, it is tracked to completion. For smaller projects, Microsoft Excel worksheet is used for tracking defects.

2. What is an error, a fault and a failure?

Error is a mistake due to human action leading to incorrect result.

A human error causes a deviation from the expected behavior. This is a fault.

Fault can cause failure. Failure is deviation of the software to perform its expected delivery or service according to performance requirements.

error fault failure

3. Why are defect reports prepared?

Defect report is a complete record of discrepancies. It is prepared so that it can be used in multiple ways to improve quality.

• To get the defect fixed.

• To report status of the application.

• To generate statistics to predict defects / patterns for next releases and / or future projects.

• To arrive at defect prevention plan.

• For driving process improvement.

Page 12: Basic Unix/Linux 1 - SEED Infotech Ltd · PDF fileBasic Unix/Linux 1 E2 ... Examples are database applications developed in Visual Basic, Power Builder ... is a set of SQL commands

Project Experience 12

E2 Series Software Testing Interview Prep

1. How does QTP recognize objects?

When one records a test using QTP, QTP creates an entry for each control you have interacted with in object repository. Each such entry is identified by a logical name generated by QTP, with set of properties like type, name etc. The references to objects in the script are identified by the logical name and class.

2. Can you import data in QTP from an MS Excel sheet?

Data can be imported from an MS Excel file to QTP using command DataTable.Import(FILENAME)

3. What is object spying? When is it used?

Identifying properties of an object is called object spying. Using the Object Spy, one can view the properties and methods of any object in an open application in the properties tab of the Object Spy dialog box.

4. What are the different actions in QTP? Differentiate between them.

When a new test is created it contains call to only one action. This single action can be broken into multiple actions for the purpose of reusability and modularity. There are two types of actions supported by QTP :

• Non-reusable - can be called only once in a test to which it belongs.

• Reusable - can be called from the same test or other tests number of times.

5. What is the extension of object repository?

Object repository extension is tsr(Test Script Repository)

6. What are default add-ins in QTP?

Default add-ins in QTP are ActiveX, Visual Basic and Web. This means QTP can identify the objects from ActiveX, Visual Basic and Web Application (HTML etc.) without any additional configuration or libraries. To add ability to recognize any other language objects like Java new add-ins need to be configured.

Page 13: Basic Unix/Linux 1 - SEED Infotech Ltd · PDF fileBasic Unix/Linux 1 E2 ... Examples are database applications developed in Visual Basic, Power Builder ... is a set of SQL commands

Project Experience 13

E2 Series Software Testing Interview Prep

1. Do you have any knowledge of databases?

Possible intention

• To know if you have basic knowledge of databases.

• To know if your approach is holistic and whether you think that peripheral knowledge is as important as knowledge of software testing process.

• To know if you take initiative to learn.

Insights

Study basic database concepts, SQL and how database is used in applications.

These type of open ended questions are a little dangerous than specific questions. Generally, they initiate a series of questions one emanating from the other. For example, you may expect following questions as part of the series

• Which other databases are you aware of?

• Do you know what is a stored procedure, trigger, cursor etc?

• How will you test a stored procedure?

• What issues have you encountered while testing a stored procedure?

• Can you test a stored procedure like a unit or must it be attached to a Visual Basic like UI and then tested?

Be confident while answering such question series. You are not expected to be an expert in databases. State what you know and you have done. Do not hesitate to admit if something is not known to you fully and you are trying to answer to the best of your knowledge.

Example answer

I have studied database concepts and some simple constructs of SQL. In my project the database used was Oracle. SQL queries, stored procedures were developed. I was involved in testing of SQL queries only. Though I have some basic knowledge of what are stored procedures and how they can be tested, I have not performed their testing for a project.

Page 14: Basic Unix/Linux 1 - SEED Infotech Ltd · PDF fileBasic Unix/Linux 1 E2 ... Examples are database applications developed in Visual Basic, Power Builder ... is a set of SQL commands

Test Automation 14

Software Testing Interview Prep E2 Series