Pages

Search This Blog

Wednesday, August 31, 2016

Software Testing - Methods

There are different method that can be used for software testing.

Black-Box Testing
The technique of testing without having any knowledge of the interior workings of the application is called black-box testing. The tester is oblivious to the system architecture and does not have access to the source code. Typically while performing a black-box test, a tester will interact with the system's user interface by providing inputs and examining outputs without knowing how and where the inputs are worked upon.

Advantages 
  •  Well suited and efficient for large code segments.
  •  Code access is not required.
  • Extra lines of code can be removed which can bring in hidden defects.
  • Due to the tester's knowledge about the code, maximum coverage is attained during test scenario writing.

Disadvantages 
  •  Limited coverage, since only a selected number of test scenarios is actually performed.
  •  Inefficient testing, due to the fact that the tester only has limited knowledge about an application.
  • The test cases are difficult to design.


White-Box Testing
White-box testing is the detailed investigation of internal logic and structure of the code. White-box testing is also called glass testing or open-box testing. In order to perform white-box testing on an application, a tester needs to know the internal workings of the code.
The tester needs to have a look inside the source code and find out which unit/chunk of the code is behaving inappropriately.
The following table lists the advantages and disadvantages of white-box testing.

 Advantages 
  • As the tester has knowledge of the source code it becomes very easy to find out which type of data can help in testing the application effectively.
  •  Extra lines of code can be removed which can bring in hidden defects.
  • Due to the tester's knowledge about the code, maximum coverage is attained during test scenario writing.

Disadvantages 
  • Due to the fact that a skilled tester is needed to perform white-box testing, the costs are increased.
  •  Sometimes it is impossible to look into every nook and corner to find out hidden errors that may create problems, as many paths will go untested.
  • It is difficult to maintain white-box testing, as it requires specialized tools like code analyzers and debugging tools.

Importance of Timesheets

What are timesheets?

Timesheets in this context are the documents, electronic or otherwise that record what time was spent by the person on what tasks. Some time sheets might also record the start and end time of each task rather than just the total time.

Why use timesheets?

The argument is sometimes around the fact that professionals work at different efficiencies so recording time against each task tends to normalise professional activities for the wrong reasons. By their nature most professionals need to apply some creativity to their work so they may have different approaches to their work: this is good. Professionals also take pride in their work so they will work to the task rather than the time: this is also good. Timesheets may be seen to undermine that.
The argument for timesheets is about having some record of people’s activities and contribution to the organisation. Of course, measuring contribution is very difficult and arguably subjective; however, using time is also arguably better than nothing. A record becomes important for a number of business functions if nothing else. Some of those are about the person’s performance but most are about the metrics of any associated project and the organisation as a whole.

So what is the value of timesheets?

Person level: the person is communicating their contribution to the organisation and to each project or activity in terms of time. They are acknowledging that they have satisfied the requirements of their employment contract. In some sense, when all the members of an organisation are completing time sheets, there is an implicit fairness between people, of the roles and contributions by those people. When summarised, the split of work between different types of activities can be calculated; that is, their utilisation. At the person level, utilisation, when compared to others in similar roles, provides information about their work habits (good, bad or otherwise).
At an organisation level and for service based businesses the time sheet data is very often the record for invoicing. Timesheet data improves an assurance that the invoice is reasonably determined.
Utilisation can also be calculated at a team and an organisational level. In this case it provides information about how good the processes are at allowing people to do their primary role (their real job).
Timesheet data can also be compared to planned effort for any project or task to track the accuracy of those estimates. In some cases this might inform decisions about how the project or task advances. In other cases it might simply inform the next project or task of the same type.
Timesheet data can also be abstracted to a cost (using a cost rate for each person). In this case, it can be used to track the costs actually incurred on a project or task and compared to the planned costs. Reactions to a difference between actual and planned costs can be slightly more sophisticated because balancing straight time may not be as important as balancing project costs.
Because timesheets are typically recording admin and leave time (annual leave, sick leave, parental leave, etc.), they also become the record for leave entitlements.

Often the reason to require timesheets of staff are compelling: because they provide the data for invoicing to clients. Otherwise, timesheets are a good democratiser of the efforts of people in an organisation. Finally, the value of timesheets to the managers of the business invariably outweighs the imposition to people in the organisation. That imposition should be minimised by using a timesheet mechanism that suits the nature of the business.

Problem with Minimal Download Strategy in SharePoint 2013

Minimal download strategy is a feature in SharePoint 2013 which improves the user navigation experience faster also improve the performance of the SharePoint site by reducing the page load time. It can improve the performance by sending only differences (delta) data when user navigates from one page to another page in SharePoint, browsing navigation controls, speed and smooth transitions by updating the areas that can be changed.
When SharePoint site has Minimal Download Strategy is enabled then site has _layouts/15/start.aspx page in the URL which is followed by the #.
MDS formatted URL is like:
http://<URL>/_layouts/15/start.aspx#/SitePages/Home.aspx,

Problem

The big problem with MDS is that it only works well with the out-of-the-box stuff on a Team Site, or similar templates. As soon as we start to drop our own Web Parts, custom scripts or customization that has not been adapted for the Minimal Download Strategy you will not see any performance benefits, we will see a performance degradation in many cases – so we turn the MDS feature off.
One of the biggest problems is that the more and more customization in SharePoint involve JavaScript and so far I have not seen a single non-SharePoint native script that can handle MDS. Common approaches to this is to use the SharePoint _spBodyOnLoadFunctionNames.push() or the jQuery $(document).ready() {} method. These methods rely on the DOM events when the page loads, so it might work perfectly fine on our first page load when MDS is enabled, since we need to fetch the full page, but on subsequent page transitions the JavaScript will not fire. An MDS page transition does not fire any DOM document load events since it asynchronously partially updates the page.

To De-activate Minimal Download Strategy,
Click on Gear icon from top right corner of the SharePoint home page.
Click on Site Settings
Navigate to Site Actions -> Manage Site Features
Find Minimal Download Strategy from list of feature and Click on Deactivate button.

Once you de-activate the Minimal Download Strategy feature, it will remove _layouts/15/start.aspx from MDS formatted URL and your page URL become like:
http://<URL>/SitePages/Home.aspx .and it works like earlier normal SharePoint page URL.

What is bug life cycle in bug tracking.

Bug Life cycle is the journey of a defect from its starting stage to its closure stage. This cycle varies from organisation to organisation. This cycle help to generate tracking report i.e how much bugs are active ,resolved, deferred, closed etc.

There are several stages in this life cycle.




 1. Open :  When a bug is raised, the status of bug is active.

 2. In-Progress : When developer identified the bug and bug are under fixing.

 3. Not a Bug : If system or application is working according to requirement then developer mark bug as a not a bug/ not reproducible.

 4. Deferred : When a bug is addressed to future release then bug assigned to deferred stage.

 5. Duplicate : If the bug is already reported, then one bug status is changed to duplicate.

 6. Fixed : The bug has been fixed and passed to testing team to verify the fix is working or not. The status of bug is changed to 'resolved'.

7. Reopened : When bug is not fixed or didn't work as expected then bug is changed from resolved to reopened.

8. Closed : If bug is verified and it is fixed then tester mark bug as closed. Duplicate or not a bug can also mark as closed bug.

Friday, August 26, 2016

Material Design

Material Design

 Material Design   is a design and developed by Google.(2014)

 Material design is one of the most influential visual philosophies in design. It’s shaping
 the way people see and interact with interfaces because of clear design and usability guidelines like a  paper effect.

 Material design framework works with all the android platforms and is know for flat
 graphical interface. Google’s new visual design framework is flat, elegant, and vibrant
 creating a unified Android experience.

 Material design is a comprehensive guide for visual, motion, and interaction design across platforms  and devices. Android now includes support for material design apps.

The material theme provides a new style for our  app, system widgets that let you set their color palette, and default animations for touch feedback and activity transitions.

Material design mostly three basic concepts:

Realistic visual cues:- The design is grounded in reality and actually inspired by design       with paper and ink.


 Bold, graphic and intentional:- Fundamental design techniques drive the visuals. Typography, grids, space, scale, color and imagery guide the entire design. Elements live in defined spaces with a clear hierarchy. Color and type choices are bold and deliberate.



Motion provides meaning:- Animation is a key component of Material Design, but it can’t just be there for the sake of movement. Animations need to happen in a single environment, serve to focus the design and include simple and easy transitions. Movements and actions should mirror the physical world.




 



Friday, August 19, 2016

Test case designing using BVA OR EP?

Boundary value analysis(BVA) and Equivalence partitioning(EP) both are test case design strategies in black box testing.

The values at the extremes (start/end values or lower/upper end values) of such classes are known as Boundary values. Analyzing the behavior of a system using such values is called Boundary value analysis.

For example: How do you do BVA for range between 1-10?

The boundary value analysis can have 6 text cases.
n,n-1,n+1 for the upper limit and n,n-1,n+1 for the lower limit.
In our example, as per BVA, there are 6 test case data, 





Equivalence partitioning  is a technique to divide the input data of software into different equivalence data classes i.e for input values.
For exampleHow do you do EP for range between 1-10?
Test condition
1. Any number greater than 10 i.e 11, then it is considered invalid.
2. Any number less than 1 i.e 0 then it is considered invalid.
3. Numbers 1 to 10 are considered valid.
4. Any 3 digit number say -100 or 100 is invalid.



These cases are derived from the requirements specification for input data. These method reduces the time for testing and useful for effective test cases.

Tuesday, August 16, 2016

Introduction to Ajax and Its Pros and Cons

AJAX

Ajax in nothing but short form of Asynchronous JavaScript And XML.By using Ajax we can Post and Get the data without fully page load event .Ajax implementation uses JavaScript functions to call methods from a web service, webpage request in response to get response.

Ajax Syntax for C# .NET-



function MyFunction(Param1, Param2) {      
 $.ajax({
        type: "POST",
        url: "MyPage.aspx/MyMethod",
        data: "{ Param1: '" + Param1+ "',Param2: '" + Param2 + "'}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (msg) {
            // On success                 
        },
        Error: function (x, e) {
            // On Error
        }
    });
}
type-Type of request Get or Post.
Url-Requested Page URL.
Data- Parameter to pass to the requested function.
ContentType-Encoding type.
DataType-Data format it may be XML/JSON.
Success-What needs to be done on success of ajax call.
Error- What needs to be done on failure of ajax call  

Advantages of AJAX

  • Reduce the traffic travels between the client and the server.
  • Response time is faster so increases performance and speed.
  • We can use JSON(JavaScript Object Notation) which is alternative to XML. JSON is key value pair and works like an array.
  • We can use Firefox browser with an add-on called as Firebug to debug all Ajax calls.
  • AJAX communicates over HTTP Protocol.

Disadvantages of AJAX

  • JavaScript disabled browsers cannot use the application.
  • It can increase design and development time
  • More complex than building classic web application
  • Security is less in AJAX application as all files are downloaded at client side.
  • Search Engine like Google cannot index AJAX pages.We cannot Bookmark AJAX URL because It might be same for more then one page.

Brief introduction of TX Text Control and print "Hello World" in pdf file

Hi,

Sharing a not new but different Technology to generate a PDF report by programming with "TX Text Control"

   It's a technology to generate a report in format of  '.pdf' and '.rtf'. In my current project, I am using it to generate a Dynamic Report with program which contain tables and paragraph of text. Generally, Tx Text control is using with '.tx' type template which contain all static information and dynamic data bind with Tx text control. Here, MailMerge class is playing crucial role. Main classes which generally use, are
1. ServerTextControl
2. MailMerge
3. SaveSetting
4. LoadSetting

Hello world!! program

  Before start with TX Text Control You have to install at your system. You can download from
Tx Text Control Download link. After filling some detail You can get trail version.


  • Add Tx Text control Reference to your project in lib folder.



Tx Text Control references dll


  • Graphical User Interface of TX Text Control.

Tx Text Control GUI


var tx = new ServerTextControl();
var res = "D:\tmp\12345.pdf";
tx.Create();
tx.Text = "Hello World !!";
var s = new SaveSetting();
tx.Save(res, GetOutputType(res), s);

I will come in my next blog with Table, paragraph ,text formatting and more changes in Tx Text Control..

Bootstrap Introduction

                                                             
Introduction:

Bootstrap is a free, open-source and is the most popular HTML, CSS, and JavaScript framework developed by twitter for creating responsive web applications.

It includes HTML and CSS based design templates for common user interface components like Buttons, Dropdowns,  Tabs, Forms, Tables, Navigations, Alerts, Modals etc. along with optional JavaScript extensions.

Bootstrap framework is based on open standards - HTML, CSS and JavaScript. This means bootstrap can be used with any server side technology and any platform. You can use it with any web application built with any server side technology like ASP.NET, JAVA etc.

What are the advantages of using bootstrap

Supports responsive design : One of the greatest advantages of using bootstrap is that it helps us create responsive web applications faster and easier. So the obvious question that comes to our mind is, what is a responsive web application? A responsive web application automatically adapts to different screen sizes (i.e desktop computers, laptops, tablets. mobile phones etc). A responsive application provides optimal viewing and interaction experience i.e easy reading and navigation with a minimum of resizing, panning, and scrolling across a wide range of devices. So you don't have to worry about your application not being compatible with multiple devices.

Saves lot of development time : One of the biggest advantages of using Bootstrap is that it saves lot of development time. Instead of writing code from the scratch, bootstrap offers ready made blocks of code that you can use and customize to suit your application requirements. There are also many websites out there that offer free and paid Bootstrap themes that saves even more development time.

Consistency : Bootstrap was developed by Twitter to encourage consistency across thier internal tools by giving their developers a centralised development code. Since all the developers are working using a centralised code, the end result is consistent regardless of who’s working on the project and which web browser is being used.

Biggest Professional Rivalry.......!!!!

Hi All,

Going to share my experience on one of the biggest professional clashes that happens within an organization. Personally they all are friends and colleagues but when it comes to their work, it always lead them to havoc which most of the times cost the project in which they are working.

Yes, I am talking about Testers v/s Developers.

I have recently joined my current organization and there I faced this for the first time in my professional career. So, I have analyzed and derived few of the reasons due to which this all time riot between testers and developers keep on thriving.

1)  The stress and the high pressure caused by the strict deadline set by the management, to complete the project in a much shorter time, than it would normally take is a most prominent reason that could result in an out busting of conflict between the two.

2) Taking base of my first point, usually we have fluctuating requirements from clients end which leads to the last time changes in a software. This makes developers to stretch their working hours and testers to run the test cycle again and again in order to finish the project under the deadline. This is obvious if someone is working extra hours under immense pressure of deadline and not getting proper amount of time for the work he/she is doing then the chances of errors and bugs are much higher.
Below flow will explain the reason for all this:




3) The difference in the job functionality between the two can also result in an interpersonal conflict. Primary responsibility of the developer is to maximize efficiency by getting the work done using the resources smartly, whereas the most desired responsibility of the tester is effectiveness, i.e. to ensure quality when delivering the end product. The difference between the job functionality and the goals of the two can automatically lead to a clash.

4) The difference in the level of experience can also result into a clash or conflict. Mostly, highly experienced developers work with the less experienced testers and the difference in the opinion and the different perceptions of the two regarding the organization can outburst the clash. Most of the testers have issues regarding job securities and self-esteem, as most organizations give more importance to the developers and to stay and prove themselves, testers have to work and exert more.

5) Another possible reason of the conflict can be the difference in the personality attributes and mental process of the testers and the developers. Most of the developers become too protective when testers identified a defect or flaw in an application, coded by them.

MVC Hidden controls are not validated

If you have used default MVC validation framework (using Annotations and jquery.validate.js) you might have faced issues with validating the controls which are hidden. As an example, in one of the scenario, I had a MVC view with too many controls, so to reduce its screen layout, I wrapped the MVC view in small expand-collapse divs, but this caused the validation to be disabled for the hidden fields.

After bit of investigation I found that it is due to the default settings of jquery.validate.js framework which explicitly excludes validation of all the hidden controls by setting the below option:
















To change the settings, I have injected custom code on window.load(). Example shown below:

$(window).load(function (e) {
    if ($('#<your formID>')[0] != undefined) {
        var validatorInitialised = $.data($('#<your formID>')[0], 'validator');
        if (validatorInitialised) {
            var settings = validatorInitialised.settings;
            //settings.ignore = ":hidden";
            settings.ignore = "";
        }
    }
});

This code first checks if the MVC page as a valid form to POST and that if there are validations applied on the page, changes the settings by removing the 'hidden' tag from the ignore list.



How to assign defect priority and severity?


Defects are given a priority and severity level. Such classification is absolutely needed as the development team can not resolve all defects simultaneously so we need to indicate how soon we want to get the defect fixed, and how big the impact on the functionality of the application under test is.Here are some classification levels:


Defect priority



High Priority: Fix the defect immediately.A core functionality fails or test execution is completely blocked.

Medium Priority: Fix the defect soon.An important functionality fails but we don't need to test it right away and we have a workaround.

Low Priority: Don't fix this defect before the high and medium defects are fixed.

Defect priority indicates the impact on the test team or test planning. If the defect blocks or greatly slows down test execution, we might want to select the highest grade for the defect priority.



Defect severity



Critical: A core functionality returns completely invalid results or doesn't work at all.

Major: This defect has impact on basic functionality.

Moderate: There is impact on the business, but only in a very few cases.

Minor: The impact on the business is minor. Any user interface defect not complicating the functionality often gets this severity grade.

Defect severity indicates the impact on the business of the client. If important functionality is blocked or if that functionality functions incorrectly,then we mostly selects the highest defect severity.
Assigning a defect priority and severity is always subjective as we measure the impact from our point of view.

Friday, August 12, 2016

Extension Methods in c#

 What is Extension Method

1. Extension method feature introduced in c# 3.0.
2. Extension of a method is a way to add some more methods as per requirement into an       existing library.
3. For Example in string we have methods like length(), split(), substring() etc. If we want that we should     have one more method that will count number of words in a string we can extends string methods by     adding one more method WordCount().

Properties of Extension Methods

1. It is a static method.
2.It must be in a static class
3. It uses "this" keyword as first parameter with a type in .NET.

Sum of Digits of a number using extension method

Step1. Very first we will create an extension method.


The above method takes and integer number as input and calculate the sum of its digit and returns sum of digits of the number.

Step 2. Now we are going to call this method from code like other inbuilt methods.














And we have created an extension method for int numbers and we have seen it can be call like other inbuilt method. 


Example Flow