Friday, August 9, 2013

Test Case Template

Below is the Test Case Template which you can follow and start writing the test cases. Learning software testing is not a big deal, but to identify the critical scenarios and writing the test cases on those scenarios is quite difficult.

One should be a good negative thinker for finding the various critical scenario where the application collapse.
It is said by the Software Testing Professional that testing cannot be learned by just reading books or reading information from internet. Practicing is the only way of improving the skills.

Now before going for writing the test cases you should be aware about some of the Testing technical terms such as Regression Testing, Functionality Testing, Retesting, Smoke Testing, etc. If you are a book lover then you can read Software Testing By Ron Patton.

Now for writing the better Test Cases you should be clear with your requirements. Many times there's a lot of confusion between the application's feature and the bug. You will be feeling strange after reading this sentence. How could one be confused between features and bugs, but believe me its happens.

This kind of situations will only be understandable if you practice more and more. So now, here we go for our Test Case Template

Test Case Template:

It should have the following attributes:

1. Test Case Id
2. Test Objective
3. Pre-Requisite
4. Steps to be Followed
5. Test Data
6. Expected Result
7. Actual Result
8. Status(Pass/Fail)
9. Comment
10. Attachment.

This is the Test Case attributes which are present in the Test Case Template. If you want this template in an excel format you can Download here



Friday, August 2, 2013

Configuring Microsoft Outlook with telerik Test Studio

How Comfortable it will be when the mails will be send automatically whenever you run your test. The test results will be sent automatically to the manager or client with every details, you just need to click on Run button in Telerik Test Studio.

Check the Code:

Well we know that the Microsoft Office is developed in the Object Model. So for accessing the office tools we will first create the instance and then we will use the Outlook Object.

If you want to see how the test report/test log can be created in Telerik Test Studio click here


Microsoft.Office.Interop.Outlook.Application outl07=new Microsoft.Office.Interop.Outlook.ApplicationClass();

//Microsoft Outlook Object is created names as outl07

            Microsoft.Office.Interop.Outlook.MailItem mail= (Microsoft.Office.Interop.Outlook.MailItem)outl07.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);

//Here the Outlook Object "MailItem is used".
// A object names as "mail" is created as the instance of the MailItem which will allow to use the different //properties such as Attachment, send, etc

            mail.Attachments.Add("D:\\Test Result.xlsx");
//Allows to add the attachment
            mail.To="abc@abc.com";
//Allows to enter the recipient
            mail.CC="xyz@xyz.com";
//Allows to add the CC
            mail.Subject="Test Result";
//Allows to add the subject
            mail.Body=@"Hello,
                        PFA for the Test Result";
//Allows to add the body
            mail.Send();  
//Allows to send the mail

For more studying about the Microsoft Outlook Objects,Properties and Methods click here

Wednesday, July 31, 2013

Creating a External Log in Telerik Test Studio

The Logs are basically useful in managing the Test Results. Also there is always demand from the manager or stack holders about the execution result of the script. So creating and maintaining the Test Execution Log by automation will enhance the quality of the framework.

The below code will allow you to create a customized Log in Telerik, Notepad, Excel. This log will consists of following:

  1. Total No of Test Steps
  2. Total No of Test Passed
  3. Total No of Test Not Executed
  4. Total No of Test Failed
  5. Also the Result message(eg. exception) can be shown in Log.  
So all these stuffs are going out by automation. Lets see how.....

Customizing the Log of Telerik: 
These statements will pass the string written under the Log.writeline to the Telerik Log.

Code:
            Log.WriteLine(result.Message);
                                //Write the message of Pass/Fail to the log of telerik
            Log.WriteLine("No of passed steps= "+ result.TotalPassedSteps);
//Shows the Count of Total Passed Steps
            Log.WriteLine("No of Failed steps= "+ result.Totalnotrunsteps);
//Shows the Count of Not Run steps
            Log.WriteLine("Total Steps= "+result.AllTestStepCount);
//Shows the Count of Total steps
*****************************************************************************
Customizing the Log in Notepad
Code:
System.IO.StreamWriter File=new System.IO.StreamWriter("c:\\source.txt");
// StreamWriter writes text files. It enables easy and efficient text output. This statement created the text file //in the specified location
            File.WriteLine(result.message);
            File.WriteLine("Message: "+ result.Message);
            File.WriteLine("Total Pass Steps= "+result.TotalPassedSteps);
            File.WriteLine("Total Fail Steps= "+result.TotalNumberOfNotRunSteps);
            File.WriteLine("Total Steps= "+result.AllTestStepCount);
            File.Close();
        }
*****************************************************************************
Customizing the Log in Excel

Microsoft Office is developed in Object Model. All the Office tools are structured as Object models.
Example: Excel 2010
Creating the application object.
Create the Workbook object by  application object.
Create the worksheet object by Workbook object.
Use the Worksheet object for different actions.

Code:

Microsoft.Office.Interop.Excel.Application excel07=new Microsoft.Office.Interop.Excel.ApplicationClass();
            Microsoft.Office.Interop.Excel.Workbook wb=excel07.Workbooks.Open(path);
            Microsoft.Office.Interop.Excel.Worksheet xlWorkSheet = (Microsoft.Office.Interop.Excel.Worksheet)wb.Worksheets.get_Item(1);
           
            excel07.Cells[1,1]=("Number of passed steps: ");
            excel07.Cells[2,1]=("Number of Not run steps: ");
            excel07.Cells[3,1]=("Number of fail steps");
            excel07.Cells[4,1]=("Total steps: ");
           
            excel07.Cells[1,2]=Convert.ToString(p);
            excel07.Cells[2,2]=Convert.ToString(nr);
            excel07.Cells[3,2]=Convert.ToString(f);
            excel07.Cells[4,2]=Convert.ToString(t);
            //excel07.Visible=true;

For more information about the Microsoft Excel Objects, Properties , Methods click here

Friday, July 26, 2013

Record and Playback in Telerik Test Studio

Telerik Test Studio comes with a comfort ease of testing by providing Record and Playback facility. Its just so simple to play with the application until and unless the objects are identified.

Point to Remember:
You perform recording only in Internet Explorer (IE), since telerik supports only IE for recording. You can run your recorded steps in in other tools such as Mozilla Firefox, Chrome, Safari.

We will do a sample record and playback on Google. Lets have a look.

1. First you need to create a New Project and a New Web Test in Test Studio.
2. Record button will appear after the Web Test. Click on Record button or right click the Web Test and click on Open, then click the Record Button.
3. IE will be opened with Telerik Test Studio Connection.
4.Enter the URL "www.google.com" in the Internet Explorer.
5. Enter the Text as "Software Testing" or anything in the search text box.
6. Click on Search button.
7. Close the IE and recording will be automatically stopped.
8. Respective steps will be created according to the recording.
9. Click on run button.



Lets have a look at the Recorder Screen and understand its various features:



Wednesday, July 24, 2013

Telerik Test Studio

Telerik Test Studio is the Functional, Regression and Performance Testing Tool.

Its a complete package for testing the Web Applications,Silverlight Applications, WPF and Manual Testing. It is a Record and Play back tool where the steps are auto generated by recording and also you can do custom coding. The languages supported by Telerik test studio are C# and VB for writing the scripts.

You can download the trial version for 30 days of the Telerik Test Studio by clicking here.

After installation when you will open the Telerik Test Studio, the first screen which will appear is as follows:


It will ask you whether you want to create a new project, Start Recording Directlly or you want to open an existing project.

Creating a New Project:
Click on "Create New Project". New Project dialog box will be appeared asking for Project Name and Location as shown below:


 A new test project will be created in Project Section. Now click on New Test button on the top ribbon and select the type of test you want to create. Here in our tutorial we will start with the web application.



Tuesday, July 23, 2013

Automation Testing Tools

Automation Testing is making its own way in Software Testing and Quality. IT market is flooded with different tool and technology both for developing as well as testing. 

Just imagine 

  • How it would be possible to manually test a Windows Calculator with at least 3 digits as input and verifying the results.
  • Load testing of a website for 100 users will require 100 people with 100 systems and a instructor to ask them to do the task at the same time.
  • Defects that are so badly fixed that they are making your running modules defective. Finding the new defects will be again a new challenge.
  • Also imagine a relaxing tester with a cup of coffee in the middle of release, since the test cases are automatically executed with a record of pass and fail, defect report is generated automatically and the stack holders and managers are getting the reports automatically by email after every interval. Yes of course this level of comfort is achieved with some code/programming knowledge.
Software Testing Tools are nothing but the software for testing another software.

Well talking about the automation testing, there are plenty of tools available in the market which are categorized according to their use. Some of the categories are the following:
  1. Functional and Regression Testing Tool: QTP,Selenium, Test Studio, RFT
  2. Unit Testing Tool: Junit,Nunit
  3. Test Management Tool: QC
  4. Performance Testing Tool: Load Runner, Silk Performer, Neoload 
  5. Bug Tracking Tool: Bugzilla, Jira
And lot more...

Some of the tools are costly and some tools are open source tools. Also the automation testers are highly paid in the industry.