Generally there is a misconception that Quality Assurance (QA) and Quality Control (QC) belong to the same family, which are often used inter-changeably and meant to imply “Testing” in majority of the cases. Though, they are closely related but theoretically and factually both terms are different in meaning as well as in purpose:
a. Quality Assurance. It is oriented towards defect prevention and focuses on the process by which the product or application is built. It involves a set of tasks to ensure that the development process is adequate to produce a system that meets its requirements. It includes following activities:
(1) Review design of software.
(2) Identify weaknesses in processes and suggest measure to improve them.
(3) Prevent introduction of issues/defects.
(4) Set standards to be followed in coding and
(5) Other process requirements aimed at ensuring that a quality product is built.
b. Quality assurance is performed through the life cycle of the product and applies to all involved in developing the product. A QA ensures that the process is well defined and looks at methodology and standards of development. It looks at items such as identifying areas for improvements in current methods and processes being followed by making them effective and ensuring consistency in the way these are followed. Thus formally quality assurance can be defined as,” A set of activities designed to ensure that the development and/or maintenance process is adequate to ensure that a system will meet its objectives”.
c. Quality Control. It is oriented towards detecting defects and correction of these defects. QC works on the product rather than the process of producing the product. QC involves a set of tasks carried out to evaluate the product that has been developed. QC is normally the responsibility of the testing team and is considered to be a line function. Although testing is a QC activity, it is not the only type of QC activity. QC includes:
(1) Examination of products to determine if they meet requirements.
(2) Testing/inspections.
(3) Documentation.
(4) Detection, reporting and correction of defects.
d. Thus, QC is to control the product to make sure it complies with a defined standard which can evidently be seen in software development life cycle (Annex A). In the classic definition QC can be defined as,”A set of activities designed to evaluate a developed work product”.
The difference between quality assurance and quality control can further be classified by the table appended as under:
|
Quality Assurance |
Quality Control |
|
|
Focus on |
QA focuses on preventing defects. | QC focuses on identifying defects. |
|
Goal |
The goal of QA is to improve development and test processes so that defects do not arise when the product is being developed | The goal of QC is to identify defects after a product is developed and before it is released. |
|
Approach |
Quality monitoring and its assurance ensure that the processes and systems are developed and adhered in such a way that the deliverables are of good quality. This process is meant to produce defect-free goods or services which means being right the first time with no or minimum rework. | It checks whether the deliverables satisfy the quality requirements as well as the specifications of the customers or not. Depending upon the results, suitable corrective action is taken by quality control personnel. |
|
Sequence |
QA is done before starting a project. During assurance of quality or monitoring process, the requirements of the customers are defined. Based on these requirements, the processes and systems are established and documented. All this is done to ensure that the requirements of the customers are met stringently. | QC begins once the product has been manufactured. Based on user requirements and standards developed during the quality guarantee process, the quality control personnel check whether the manufactured product meets all those requirements or not. |
Table – 1 Difference between Quality Assurance and Quality Control
Strategy followed at Software houses. Coding techniques and methods of development followed in software houses are most of the times in coherence with the international standard of coding. The typical steps followed are:
a. Quality Assurance (Annexure B)
(1) Problem Identification. To set the overall purpose and objectives of the risk assessment and to determine the likely data requirements.
(2) Problem Analysis. To gather information that helps you determines the nature of a problem encountered on your system.
(3) Problem Correction. To correct the problem identified in QC process.
(4) Feedback to QA. Process of control to reduce the defects for Quality Control.
b. Quality Control (Annexure C)
(1) Data Gathering. It is a frequent part of solving problems and satisfying curiosity.
(2) Problem Trend Analysis. Based on number of problems occurring in the area under study.
(3) Process Identification. Each process is identified with a unique name/number.
(4) Process Analysis. A process can be defined as “a logical series of related transactions that converts input to results or output”.
(5) Process Improvement. It is a series of actions taken by a process owner to identify, analyze and improve existing processes
Google’s New Approach. Google took an approach which is referred as Test Engineering. This as a bridge between the meta world of quality assurance and the concrete world of quality control. Its approach allows ensuring that Google gets the opportunity to think about customers and their needs, while still providing results that are needed on day to day engineering projects.
Their teams certainly work with software engineers in QA and QC roles, but they also work with teams to ensure that a product is testable, that it is adequately unit tested, and that it can be automated even further to their teams. They often review design documents and ask for more test hooks in a project, and implement mock objects and servers to help developers with their unit testing and to allow teams to test components individually.
They have put an emphasis on building automated tests so it lets users do what users are good at, and have computers do what computers are good at. That doesn’t mean that they never do manual testing, but instead that the do the “right” amount of manual testing with more human-oriented focus (e.g. exploratory testing), and try to ensure that they never do repetitive manual testing.
Annexure A
Warning: Editing registry may cause problems to your PC.
If you facing problems in trying to uninstall Oracle from your Windows workstation, or unable to uninstall Oracle installations cleanly and properly, the following steps may be used to uninstall all Oracle products currently install on the workstation:
1. Uninstall all Oracle components using the Oracle Universal Installer (OUI).
2. Delete the HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE key which contains registry entries for all Oracle products by using regedit.
3. Delete any references to Oracle services/components in the following registry location: HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/. Looks for key entries that starts with “Ora” which are obviously related to Oracle.
4. Reboot the workstation.
5. Delete the ORACLE_BASE directory. (i.e C:\Oracle)
6. Delete the C:\Program Files\Oracle directory.
7. Empty the temp directory.
8. Empty the recycle bin.
With this, the computer is more or less clear of any Oracle components, which allows you to reinstall Oracle if needed
A generic class is class with one or more type variables. We will understand generic class with a simple example. In this example we have a simple Pair class which allows us to focus in generics without being distracted by data storage details.
public class Pair <T>{
private T first;
private T second;
public Pair() { first = null; second = null; }
public Pair(T first, T second) { this.first = first; this.second = second; }
public T getFirst() {
return first;
}
public void setFirst(T first) {
this.first = first;
}
public T getSecond() {
return second;
}
public void setSecond(T second) {
this.second = second;
}
}
The Pair class introduces a type variable T, enclosed in angle brackets, < >, after the class name. A generic class can have more than one type variable. For example, we could have defined the Pair class with separate types for the first and second field:
public class Pair <T, U> {
}
The type variables are used throughout the class definition to specify method return and the types of fields and local variables. For example,
private T first; // uses type variable
It is common practice to use uppercase letters for type variables, and to keep them short. The Java library uses the variable E for the element type of a collection, K and V for key and value types of a table, and T (and the neighboring letters U and S, if necessary) for and any type at all.
public class MainClass {
public static void main(String args[]){
String[] word ={"Mary", "Had","a","Little","lamb"};
Integer[] a ={ 1,2,3};
Pair<String> mm = ArrayAlg.minmax(word);
Pair<Integer>number = ArrayAlg.number(a);
System.out.println("min = " + mm.getFirst());
System.out.println("max = " + mm.getSecond());
System.out.println("To check if it can take Integer class too");
System.out.println("First = "+ number.getFirst());
System.out.println("Second = "+ number.getSecond());
}
}
public class ArrayAlg {
public static Pair<String> minmax(String[] a)
{
if (a == null || a.length == 0) return null;
String min = a[0];
String max = a[0];
for (int i = 1; i < a.length; i++)
{
if (min.compareTo(a[i]) > 0) min = a[i];
if (max.compareTo(a[i]) < 0) max = a[i];
}
return new Pair<String>(min, max);
}
public static Pair<Integer> number(Integer[] a){
Integer first = a[0];
Integer second = a[1];
return new Pair<Integer>(first,second);
}
}
Similarly, we can define generic methods both inside ordinary classes and inside generic classes. The type variables are inserted after the modifier i.e (public static etc etc..) and before the return type.
class ArrayAlg
{
public static <T> T getMiddle(T[] a)
{
return a[a.length / 2]);
}
}
Suppose there are two tables as under :
Table 1 (CLUBS)
| ID | CLUB_NAME | TOTAL_CAPACITY | SESSION_ID |
| 1 | Volley Ball | 10 | 2 |
| 2 | Cricket | 10 | 2 |
| 3 | Volley Ball | 10 | 1 |
Table 2 (CLUBS_DIV)
| ID | CLUB_ID | DIV_ID | DIV_CAPACITY |
| 1 | 1 | 4 | 5 |
| 2 | 1 | 5 | 3 |
| 3 | 1 | 6 | 2 |
| 4 | 2 | 4 | 3 |
| 5 | 2 | 5 | 5 |
| 6 | 2 | 6 | 2 |
| 7 | 3 | 4 | 5 |
| 8 | 3 | 5 | 3 |
| 9 | 3 | 6 | 2 |
CLUBS and CLUBS_DIV has one to many relationship. The primary key ( ID ) of CLUBS table is foreign key in table CLUBS_DIV (CLUB_ID). SESSION_ID in CLUBS table is a foreign key referencing a table named SESSION.
Now the scenario is that we want to retrieve all the values of CLUBS_DIV when the SESSION_ID = 2.
The persistence classes for these tables are as under:
Clubs.java
public class Clubs extends ObjectInfo{
private Set clubsDiv = new HashSet();
private String clubName;
private long totalCapacity;
private SessionInfo session;
/*
…………………………………
getters and setter
…………………………………… */
}
ClubsDiv.java
public class ClubsDiv extends ObjectInfo{
private Clubs clubs;
private Section section;
private SessionInfo session;
private long divCapacity;
public void ClubsDiv(){
}
/*
…………………………………
getters and setter
…………………………………… */
}
To retrieve results we are going to use criteria as following:
SessionInfo currentSession = new SessionInfo();
currentSession = new SessionBean().getRunningSession();
long sessionId = currentSession.getId();
try{
hibernateSession = HibernateUtil.currentSession();
hibernateTransacion = hibernateSession.beginTransaction();
Criteria crit = hibernateSession.createCriteria(ClubsDiv.class);
crit.createCriteria(“clubs”)
.createCriteria(“session”)
.add(Restrictions.eq(“id”,sessionId));
clubList =crit.list();
Iterator itr = clubList.iterator();
while(itr.hasNext()){
ClubsDiv clubsDiv = (ClubsDiv) itr.next();
this.clubsList = clubList;
clubsDiv.getSection().getSectionName();
clubsDiv.getDivCapacity();
clubsDiv.getClubs().getClubName();
}
}
Using java.util.Date is quite common and often we are encountered with situations where we want to compare Timestamp. The class hierarchy of Timestamp class is:
java.lang.Object
java.sql.Timestamp
The code given below represents a situation where current timestamp (today’s date) is between two given timestamps i.e startDate and endDate.
Function
public int timeStampCompare(Date today,Date date){
if (today == date) {
return 0;
}
else if (today.compareTo(date)<0) {
return -1;
}
else{
return 1;
}
}
Calling the above function
Date today = new Date();// gives us the present date and time
if (timeStampCompare(today, startDate)!=-1 && timeStampCompare(today, endDate)!=1 ){
System.out.println(“ I am between the timestamp ”);
}
else{
System.out.println(“ Oppss! time is over ”);
}


