Sunday, April 13, 2014




Writing Tests for an object/scenario/application in a testing interview:

Sometimes interviewers give an object or a scenario and wants interviewees to write tests for them. The intent behind these questions is to identify if the interviewee could understand the situation and think of various ways to tests the system. It would also give an idea about the interviewee’s lateral thinking. The wider you can think, the more is the coverage. In situations like these try to come up with as many tests as you can but always start with the most important usecases. There is no correct way to write the test but if you keep the following in mind you would be able to cover much ground:
1: Think of all the use cases first (as many as you can). These would be mostly priority 4 functional tests. Eg, If you were to test a Bangle (metallic ring), you could write the following usecases:
a: Bangle could be worn.
b: could be used to draw circle.
c: could be used to hit somebody.
d: could be used to open beer bottles.
e: could be melt to extract metal which in turn could be used for various purposes
so on and so forth

2: Think of all the atomic parts the object is made up of and write tests on them. For the whole system to function properly, each of its components should be functioning properly. Eg, suppose the interviewer asks you to test a PEN. Pen could be further broken into a refill, a cap, a grip, a case, a nib etc. Write tests for each of them (The interviewer could argue that these are unit tests to be performed by developer)

3: Apart from functional tests a quality product/feature should be evaluated on non functional aspects as well. You could consider writing tests for the following non functional test types:
  • Performance
  • UI
  • Usability
  • Security
  • Localization and Globalization testing
  • Recovery testing
  • Negative testing
  • Compatibility
  • Workflow etc.
 4: Tests to be written keeping in view the datapoints into application. Application should be tested using valid and invalid data. Popular techniques like boundary value analysis and equivalence partition could be used here.
1: Valid inputs and different type of valid inputs.
2: Invalid inputs and different types of invalid inputs.
3: Special inputs (like zero null, blank values)

5: Sometimes the application given by the interviewer is too complicated to understand in the first go. The intention of giving a complex system to test is to test how you grasp things, how you make assumptions, what do you do for things are not clear. In such situations ask questions (VALID questions), as many as you can. The more questions asked the more understanding you’ll develop and easier it would be to write tests
Also think of the components working behind the scenes. The interviewer might not explicitly tell you to tests them but you should be able to write test for them as well. A classic example would be to test a chat messenger or a login page. Nobody would ever tell you that there is a database working at the backend but it would be important to test the databases functions properly.

6: Think of the environment surrounding the application. The interviewer would talk about one of the supported environments. DO NOT make assumptions. Ask questions to yourself like what would happen if you change the environment itself. Eg, you could say that a pen is working in India. But could you say that the same pen works in Antarctica or a place with zero gravity. These would also be important tests. Another Eg, suppose interviewer wants you to test a login page. The login page could be viewed on various OS platforms, various devices and on a variety of browsers.  

Features of a Good Test Automation Framework:

In interviews for a test engineer often times the interviewer wishes to know if you could design an automation system all by yourself if need be. Following are the features to look for while designing an test automation framework. 
1: Scalable: Test engineers should be able to add a number of tests. Number of tests should not affect execution of tests.
2: Minimal intervention for running the tests. Ideally, it should be a zero click system. As soon as the build arrives and passes the smoke test, a test run should be scheduled.
3: Good Reporting: After the tests are run, a report to be sent to all the stakeholders. 
4: Good Logging: Logging should be such that it could exactly pin point the cause of the failures. 
5: Fail-fast: Failures should be detected ASAP. Eg, if a failure occurred at the time of build set up, tests should be aborted and a new run should be created. If the failure occurred at the time of build set up and the test automation framework did not report the failure, the tests would get run and eventually all of them would fail. This would result in time loss.
6: Ability to recover from power failures, system restarts and exceptional conditions.  
7: Multiple tests could be run in parallel. Most of the times the test team would have a suite of machines assigned to them, if the automation framework could not run tests on multiple machines resources would get wasted. 
8: Should be able to reveal the correct status of the project. Test team should be able to track all the failures and passed tests. Comparasion with previous runs should be made avaliable.

Feel free to add more.

Friday, February 14, 2014

Deploy a WAR file on root context in JBoss 7.1


1: set “enable-welcome-root” to false in \standalone\configuration\standalone.xml.

2: Create an empty file with name "ROOT.war.dodeploy" and place it in \standalone\deployments

3: Rename cq snapshot war file to ROOT.war and place it in \standalone\deployments.

4: run standalone.bat file

Thanks!!

Sunday, May 10, 2009

Obama's taxation policies!! dont worry


With the emergence of new taxing system(which Obama has proposed), all the companies of American origin which outsource their labor are going to be affected. But it would not have any affect on companies of Indian origin like Infosys, TCS. The likes of microsoft, google are surely going to get affected. In the present scenerio they escape taxes by outsourcing their labor, but if Obama's praposal is put into action they will get rebate on taxes if they dont outsource their job and instead keep them in their country.
If the new taxation system is realised competitiveness of American and Indian companies will increase which will pressurise US based companies to increase their cost. Hence Obama's new policies are a boon for India based IT companies.