Wednesday, September 29, 2010

Software Testing Types

Software Testing Types:

1. Black box testing - Internal system design is not considered in this type of testing. Tests are based on requirements and functionality

2. White box testing - This testing is based on knowledge of the internal logic of an application’s code. Also known as Glass box Testing. Internal software and code working should be known for this type of testing. Tests are based on coverage of code statements, branches, paths, conditions.

3. Unit testing - Testing of individual software components or modules. Typically done by the programmer and not by testers, as it requires detailed knowledge of the internal program design and code. may require developing test driver modules or test harnesses.

4. Incremental integration testing - Bottom up approach for testing i.e continuous testing of an application as new functionality is added; Application functionality and modules should be independent enough to test separately. done by programmers or by testers.

5. Integration testing - Testing of integrated modules to verify combined functionality after integration. Modules are typically code modules, individual applications, client and server applications on a network, etc. This type of testing is especially relevant to client/server and distributed systems.

6. Functional testing - This type of testing ignores the internal parts and focus on the output is as per requirement or not. Black-box type testing geared to functional requirements of an application.

7. System testing - Entire system is tested as per the requirements. Black-box type testing that is based on overall requirements specifications, covers all combined parts of a system.

8. End-to-end testing - Similar to system testing, involves testing of a complete application environment in a situation that mimics real-world use, such as interacting with a database, using network communications, or interacting with other hardware, applications, or systems if appropriate.

9. Sanity testing - Testing to determine if a new software version is performing well enough to accept it for a major testing effort. If application is crashing for initial use then system is not stable enough for further testing and build or application is assigned to fix.

10. Regression testing - Testing the application as a whole for the modification in any module or functionality. Difficult to cover all the system in regression testing so typically automation tools are used for these testing types.

11. Acceptance testing -Normally this type of testing is done to verify if system meets the customer specified requirements. User or customer do this testing to determine whether to accept application.

12. Load testing - Its a performance testing to check system behavior under load. Testing an application under heavy loads, such as testing of a web site under a range of loads to determine at what point the system’s response time degrades or fails.

13. Stress testing - System is stressed beyond its specifications to check how and when it fails. Performed under heavy load like putting large number beyond storage capacity, complex database queries, continuous input to system or database load.

14. Performance testing - Term often used interchangeably with ’stress’ and ‘load’ testing. To check whether system meets performance requirements. Used different performance and load tools to do this.

15. Usability testing - User-friendliness check. Application flow is tested, Can new user understand the application easily, Proper help documented whenever user stuck at any point. Basically system navigation is checked in this testing.

16. Install/uninstall testing - Tested for full, partial, or upgrade install/uninstall processes on different operating systems under different hardware, software environment.

17. Recovery testing - Testing how well a system recovers from crashes, hardware failures, or other catastrophic problems.

18. Security testing - Can system be penetrated by any hacking way. Testing how well the system protects against unauthorized internal or external access. Checked if system, database is safe from external attacks.

19. Compatibility testing - Testing how well software performs in a particular hardware/software/operating system/network environment and different combination s of above.

20. Comparison testing - Comparison of product strengths and weaknesses with previous versions or other similar products.

21. Alpha testing - In house virtual user environment can be created for this type of testing. Testing is done at the end of development. Still minor design changes may be made as a result of such testing.

22. Beta testing - Testing typically done by end-users or others. Final testing before releasing application for commercial purpose.

Differences between Error, Bug, and Defect:

Error: The difference between expected result and actual result is error

Bug: I f that error comes at the tome of development stage before production then it is bug.

Defect: If that error comes after production then we say it is defect.

Java Script Validations

//------------------------------------------------------------------------------------------------------------------------------------
/*
This method is used to Check whether entered character is character or not
*/
//------------------------------------------------------------------------------------------------------------------------------------
function CheckIsCharacter(evt) {

evt = (evt) ? evt : window.event;
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode > 31 && (charCode <> 90) && (charCode <> 122)) {
alert("This field accepts alphabets only.");
return false
}
return true
}


//------------------------------------------------------------------------------------------------------------------------------------
/*
This method is used to Check whether entered character is numeric or not
*/
//------------------------------------------------------------------------------------------------------------------------------------
function CheckNumericValue(e)
{
var key = e.which ? e.which : e.keyCode;;

if((key >=48 && key <= 57) || key == 58) { return true; } else { return false; } } //------------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------------ /* This method is used to Check whether entered character is numeric or not */ //------------------------------------------------------------------------------------------------------------------------------------ function CheckNumericValueWithoutColon(e) { var key = e.which ? e.which : e.keyCode;; if(key >=48 && key <= 57) { return true; } else { return false; } } //------------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------------ /* This method is used to Check whether entered Time is valid or Invalid */ //------------------------------------------------------------------------------------------------------------------------------------ function CheckTime(obj) { var txt = document.getElementById(obj); var val = txt.value; if (val != "") { if (parseInt(val.indexOf(':')) == 0) { alert('Invalid Entry..'); txt.value = ""; return false; } else if(parseInt(val.indexOf(':')) == -1) { if(val.length > 2)
{
alert('Please Enter Time in the HH:MM format');
txt.focus();
txt.value = "";
return false;
}
else
{
if((parseInt(val) <> 23))
{
alert('Please Enter Hours in the range of [0 - 23]');
txt.focus();
txt.value = "";
return false;
}
else
{
if(parseInt(val.length) == 1)
{
var Hrs = "0" + val + ":" + "00";
txt.value = Hrs;
}
else
{
txt.value = val + ":" + "00";
}
}
}
}
else
{
if(parseInt(val.indexOf(':')) != 0)
{
var strSpilt = val.split(':');
var hrslength = strSpilt[0].length;
var minslength = strSpilt[1].length;
var strHours;
var strMins;

if((parseInt(strSpilt[0]) <> 23))
{
alert('Hours should not be in the range of [0 - 23]');
txt.focus();
txt.value = "";
return false;
}
if(strSpilt[1] != "")
{
if((parseInt(strSpilt[1]) <> 59))
{
alert('Minutes should be in the range of [0 - 59]');
txt.value = val.substring(0,(parseInt(val.indexOf(':')) + 1));
txt.focus();
return false;
}
}
else
{
alert('Please Enter Minutes in the range of [0 - 59]');
txt.focus();
return false;
}

if(parseInt(hrslength) > 0)
{
if(parseInt(hrslength) == 1)
{
strHours = "0" + strSpilt[0];
}
else
{
strHours = strSpilt[0];
}
}
if(parseInt(minslength) > 0)
{
if(parseInt(minslength) == 1)
{
strMins = "0" + strSpilt[1];
}
else
{
strMins = strSpilt[1];
}
}
txt.value = strHours + ":" + strMins;
}
}
}
return txt.value;
}

//------------------------------------------------------------------------------------------------------------------------------------

//------------------------------------------------------------------------------------------------------------------------------------
/*
This method is used to Check whether entered FromTime is valid or Invalid
*/
//------------------------------------------------------------------------------------------------------------------------------------

function CheckFromTime(Grid,index)
{
var grid = document.getElementById(Grid);
var input = grid.rows[index + 1].getElementsByTagName("input");
var FromTimeID;
var ToTimeID;

for(var i = 0;i<=input.length-1;i++) { if(input[i].type != null) { if(input[i].type =="text") { var ids = input[i].id.substring(input[i].id.lastIndexOf('_') + 1); if(ids == "GrdtxtFromTime") { FromTimeID = input[i].id; } if(ids == "GrdtxtToTime") { ToTimeID = input[i].id; } } } } var FromTime = CheckTime(FromTimeID); var ToTime = document.getElementById(ToTimeID); var ConvertFromTime = ConvertintoDateTime(FromTime); if(ToTime.value != "") { var ConvertToTime = ConvertintoDateTime(ToTime.value); if(Date.parse(ConvertFromTime) >= Date.parse(ConvertToTime))
{
alert('From Time should be less than To Time');
document.getElementById(FromTimeID).focus();
document.getElementById(FromTimeID).value = "";
return false;
}
}
}
//------------------------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------------------------
/*
This method is used to Check whether entered ToTime is valid or Invalid
*/
//------------------------------------------------------------------------------------------------------------------------------------
function CheckToTime(Grid,index)
{
var grid = document.getElementById(Grid);
var input = grid.rows[index + 1].getElementsByTagName("input");
var FromTimeID;
var ToTimeID;

for(var i = 0;i<=input.length-1;i++) { if(input[i].type != null) { if(input[i].type =="text") { var ids = input[i].id.substring(input[i].id.lastIndexOf('_') + 1); if(ids == "GrdtxtFromTime") { FromTimeID = input[i].id; } if(ids == "GrdtxtToTime") { ToTimeID = input[i].id; } } } } var FromTime = document.getElementById(FromTimeID); if(FromTime.value != "") { var ToTime = CheckTime(ToTimeID); var ConvertToTime = ConvertintoDateTime(ToTime); var ConvertFromTime = ConvertintoDateTime(FromTime.value); if(ToTime != "") { if(Date.parse(ConvertToTime) <= Date.parse(ConvertFromTime)) { alert('To Time should be greater than From Time'); document.getElementById(ToTimeID).value = ""; return false; } } } else { //alert('Please Enter From Time first...'); document.getElementById(ToTimeID).value = ""; return false; } } //------------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------------ /* This method is used to Convert Time into DateTime */ //------------------------------------------------------------------------------------------------------------------------------------ function ConvertintoDateTime(Val) { var d1 = new Date(); var MM = d1.getMonth() + 1; var DD = d1.getDate(); var YYYY = d1.getFullYear(); var strDate = MM + '/' + DD + '/' + YYYY; var d2 = new Date(strDate + " " + Val); return d2; } //------------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------------ /* This method is used to Enable/Disable TextBoxes in a GridView based on checkbox checked */ //------------------------------------------------------------------------------------------------------------------------------------ function EnableCtrls(Grid,index) { var grid = document.getElementById(Grid); var input = grid.rows[index + 1].getElementsByTagName("input"); for(var i = 0;i<=input.length-1;i++) { if(input[i].type != null) { var chkflag; if(input[i].type =="checkbox") { chkflag = document.getElementById(input[i].id); } if(chkflag.checked == true) { if(input[i].type =="text") { document.getElementById(input[i].id).disabled = false; } } else { if(input[i].type =="text") { document.getElementById(input[i].id).value = ""; document.getElementById(input[i].id).disabled = true; } } } } } //------------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------------ /* This method is used to Enable/Disable TextBoxes in a GridView based on checkbox checked */ //------------------------------------------------------------------------------------------------------------------------------------ function CheckCases(Grid,index,str) { var grid = document.getElementById(Grid); var input = grid.rows[index + 1].getElementsByTagName("input"); var FollowUpCasesID; var NewCasesID; for(var i = 0;i<=input.length-1;i++) { if(input[i].type != null) { if(input[i].type =="text") { var ids = input[i].id.substring(input[i].id.lastIndexOf('_') + 1); if(ids == "GrdtxtNewCases") { NewCasesID = input[i].id; } if(ids == "GrdtxtFollowUpCases") { FollowUpCasesID = input[i].id; } } } } var followUpCases = document.getElementById(FollowUpCasesID); var NewCases = document.getElementById(NewCasesID); var tot = 0; var fpCases = 0; var NCases = 0; if (followUpCases.value != "") { tot = parseInt(tot) + parseInt(followUpCases.value); } if (NewCases.value != "") { tot = parseInt(tot) + parseInt(NewCases.value); } if(parseInt(tot) > 32)
{
alert('Total Cases should not exceed more than 32');
if(str == "FollowUpCases")
{
document.getElementById(FollowUpCasesID).value = "";
document.getElementById(FollowUpCasesID).focus();
}
if(str == "NewCases")
{
document.getElementById(NewCasesID).value = "";
document.getElementById(NewCasesID).focus();
}
return false;
}

}
//------------------------------------------------------------------------------------------------------------------------------------

TO Check the entered text is Number or not

Hi,
Guys if u are entering a text in text box to check if it is number or string there is a java script function as follows:

function CheckIsNumber(evt) {
evt = (evt) ? evt : window.event;
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode > 31 && (charCode <> 57)) {
alert("This field accepts numbers only.");
return false
}
return true
}

Call this function at textbox event :
asp:TextBox ID="txt_CreditNoteAmt" onkeypress="return CheckIsNumber(event);" AutoPostBack="true" runat="server" Width="50" Enabled="false" OnTextChanged="txt_CreditNoteAmt_Changed"

.NET History & Information


NET History & Information

Many people are found confused about what exactly is .NET. Well, the Microsoft .Net is a new internet technology or rather strategy introduced by Microsoft. .Net was originally known as the NGWS (Next Generation Windows Services) which was said to be an Internet based platform of Next Generation Windows Services. Before the official announcement of .Net, NGWS was the term used to describe the above phrase.


According to Steve Ballmer who quoted in January 2000, “Delivering an Internet-based platform of Next Generation Windows Services is the top priority of our company. The breakthroughs we’re talking about here include changes to the programming model, to the user interface, to the application integration model, the file system, new XML schema…..”


Some people even considered Microsoft .Net as a new operating system; which is not the case. Microsoft .Net is net Web and Internet Strategy introduced by Microsoft. .Net introduces improved programming models and provide new and better Web based infrastructure. One of the key facts about .Net is that it delivers software as web services and the framework provided by Microsoft .Net is for universal services. Another important fact about .Net that you should always remember is that it can run on any browser and on any platform. Microsoft .Net is purely based on new web standards and is based on a new model; server centric computing model.


The Microsoft’s .Net is based on the new web/internet standards. For our readers who are not aware of the new web standards, here are some of the main web standards on which .Net is based:

  • UDDI: is a standard on which .Net is based in order to discover & search various Web Services. Remember that in Microsoft’s .Net terminology, Software is called as web services.
  • SOAP: defines the standard format to be used when requesting any Web Service.
  • HTTP: the classic standard that defines the communication protocol between various Internet Applications regardless of their platform.
  • XML: defines the format to be used for exchanging data between various Internet applications.

One of the most important terms that you will come across after .Net is the .Net Framework. Do you have any idea about what exactly is the .Net Framework? The .Net Framework, by definition, is the infrastructure for Microsoft .Net Platform. The .Net Framework provides a unique environment that can be used for developing, deploying and executing various Web Services independent of the platform.

For our new learners, one thing to remember here about .Net Framework is that it contains various common libraries like ASP.NET etc and it also contains various Windows Forms. The .Net Framework supports C++, Visual Basic, Jscript, COBOL, Perl, C#, Python, Smalltalk and various other languages. All of these languages are used in the development of various platform independent .Net Applications.

The first step that our learners should take here is to get the Visual Studio.Net that will provide them with a perfect development environment and the user won’t feel, by working on Visual Studio.Net, that he is handling different developing languages at the same time.