Tuesday 8 October 2013

Twisted Testers


software_testing_quality_assurance_sem7_logo
A Tester is a person who is able to rapidly discover highly relevant information about the product, who makes the most use of any resource that is available to him/her, and who has the respect of people involved in a project. It is a person who can be trusted.
There will be times, when as Testers you will encounter circumstances where you have to defend your findings. You will have to convince people to take action, so you’d better know how to explain why your findings are relevant. I glad to a tester and I love this job as it is a process oriented job. My work spans from analyzing the requirement documents to writing Test plans, Test cases, Testing the applications, Logging defects in defect tracking tool. (In market there are n number of tools are available like Redmine, Asana, Jira, Pivotal, Bugzilla). If you will search the following keywords on internet you will get know about these tools.
Another reason why I love testing is that I have a keen eye for details and defects dont escape my sight easily. The more defects i find the more happier I am. Developers code in a straight line (180 degree) but a Tester has to think from all directions (360 degrees). In testing indubitably first we need to verify the process to ensure that the work product meets their specification and then we validate if the product meets the client’s requirements in the intended environment or not.
As a tester one question is always on my mind that how I ensure that I cover 100% testing before giving a release to the client? Which is next to impossible in real world scenarios, and once discussing about the same with my senior, he happened to mention about “Exit Criteria”. He went on to explain that “The exit criteria says – the software will be acceptable to the client only if there are No critical defects, No high defects, No medium defects, Only two low defects.”  Thus only two low defects are acceptable and thus 100% coverage is measured by this exit criteria.
Let take a look at what are the different ways of how we Testers go about testing every module that comes our way:
software bug

Black Box vs Grey Box vs White Box

S.N.Black Box TestingGrey Box TestingWhite Box Testing
1The Internal Workings of an application are not required to be knownSomewhat knowledge of the internal workings are knownTester has full knowledge of the Internal workings of the application
2Also known as closed box testing, data driven testing and functional testingAnother term for grey box testing is translucent testing as the tester has limited knowledge of the insides of the applicationAlso known as clear box testing, structural testing or code based testing
3Performed by end users and also by testers and developersPerformed by end users and also by testers and developersNormally done by testers and developers
4Testing is based on external expectations – Internal behavior of the application is unknownTesting is done on the basis of high level database diagrams and data flow diagramsInternal workings are fully known and the tester can design test data accordingly
5This is the least time consuming and exhaustivePartly time consuming and exhaustiveThe most exhaustive and time consuming type of testing
6Not suited to algorithm testingNot suited to algorithm testingSuited for algorithm testing
7This can only be done by trial and error methodData domains and Internal boundaries can be tested, if knownData domains and Internal boundaries can be better tested
For more blogs stay tuned with twistedtesters.blogspot.com

Tuesday 1 October 2013

UI automator review


Many people like me are in search for a automation framework for testing UI of there android application. I searched and explored several tools and later found that Android itself provides a powerful and efficient framework to Automate functional UI testcases that can be run against your app on one or more devices.
The UIautomator API includes classes, interfaces and exceptions to capture and manipulate the UI of target apps.
Let’s see the Pro’s and Con’s for the tool:
Pro’s:
1] Specially created for android UI testing
2] Simple and easy to use for Blackbox testing
3] Well documented tutorials to get started and creating scripts
4] Response time and Usability is better than HierarchyViewer of viewing hierarchy of views
Con’s:
1] Webview is not currently supported
2] Lacks the feature of showing missing Views similar to HierarchyViewer however since during testing we are most of the times interested in visible views, this may not have major impact. If this feature is incorporated in HierarchyViewer then it may eliminate the dependency on HierarchyViewer.
3] Only supports API Level 16 and above
Would be publishing blog on creation and execution of UIautomator scripts soon......

One simple habit to Avoid Object not found exception and making robust test cases which run on multiple devices


Android devices comes in variety of sizes and dimensions and as UiAutomator is completely decoupled from the source code of your app, unless it can see something on the screen, it has no idea that it even exists. Tests need to be run on a variety of devices, what may be immediately visible on one device may not be on another device. So to avoid “object not found exception “we must script the object smartly and always think of this scenario while building UI Automator scripts.
Note: Technique below is just a sample and works in most of the cases especially where ListViews and RelativeLayouts are concerned, You may have to implement different techniques depending on your application.
The way we normally code UI objects having the text “Test “
new UiObject(
new UiSelector().text(“Test”)
).click();
However, there will almost certainly be devices that are too small for the section containing this text to appear in the first page, so UiAutomator won’t know it exists and will return a exception ”Object not found”. So we always use UIScrollable with objects and declare object as
new UiScrollable(
new UiSelector().scrollable(true)
).scrollIntoView(
new UiSelector().text(“Text”)
);
new UiObject(
new UiSelector().text(“Text”)
).click();
UiAutomator will now scroll through entire page until it finds the text “Test”. If the text “Test” is already visible on the first page, it’ll click. This method will have a short performance hit over the initial method while it looks for the text but this is an incredibly simple extra step to take and a great habit to get into for robust tests.

As I explore more through UI Automator will keep posting tips, tricks and tutorials so stay tuned……….


Saturday 17 August 2013

Interrupt testing on mobile

Interrupt testing is process to replicate abrupt(Unexpected) interrupt to the application,This can be achieved in various ways and techniques depending on the application under test.


Common Interrupts :

1]Phone call when the application is running or is in background
2]Battery removal when the application is running or is in background
3]Device shut down
4]OS upgrade
5]Run other applications that uses your android resources to the fullest(suggestion : Bus driving 3d)

Some specific scenarios for application using network :

1]Connect to network but remove LAN connection from router so device can sense wifi state on device but cannot connect to internet
2]Connection via VPN and VPN disconnected

Scenario for Application using services :

1]Kill service by clicking on recent button and swiping the application right to kill app and services
2]Kill app using third party App killer
3]Kill specific services from Settings->Manage Applications

Scenarios for Application Linked to account Manager :

1]Remove account from Settings->Account Manager


Life cycle of BUG

Life cycle of BUG :-



Bug status description:
These are various stages of bug life cycle. The status caption may vary depending on the bug tracking system you are using.

1) New: When QA files new bug.

2) Deferred: If the bug is not related to current build or can not be fixed in this release or bug is not important to fix immediately then the project manager can set the bug status as deferred.

3) Assigned: ‘Assigned to’ field is set by project lead or manager and assigns bug to developer.

4) Resolved/Fixed: When developer makes necessary code changes and verifies the changes then he/she can make bug status as ‘Fixed’ and the bug is passed to testing team.

5) Could not reproduce: If developer is not able to reproduce the bug by the steps given in bug report by QA then developer can mark the bug as ‘CNR’. QA needs action to check if bug is reproduced and can assign to developer with detailed reproducing steps.

6) Need more information: If developer is not clear about the bug reproduce steps provided by QA to reproduce the bug, then he/she can mark it as “Need more information’. In this case QA needs to add detailed reproducing steps and assign bug back to dev for fix.

7) Reopen: If QA is not satisfy with the fix and if bug is still reproducible even after fix then QA can mark it as ‘Reopen’ so that developer can take appropriate action.

8 ) Closed: If bug is verified by the QA team and if the fix is ok and problem is solved then QA can mark bug as ‘Closed’.

9) Rejected/Invalid: Some times developer or team lead can mark the bug as Rejected or invalid if the system is working according to specifications and bug is just due to some misinterpretation.