Pages

Wednesday, 25 February 2015

Testing Concepts

9. What is component testing?

Component testing, also known as unit, module and program testing, searches for defects in, and verifies the functioning of software (e.g. modules, programs, objects, classes, etc.) that are separately testable. Component testing may be done in isolation from the rest of the system depending on the context of the development life cycle and the system. Most often stubs and drivers are used to replace the missing software and simulate the interface between the software components in a simple manner. A stub is called from the software component to be tested; a driver calls a component to be tested.

10. What are the different Methodologies in Agile Development Model?

There are currently seven different agile methodologies that I am aware of:
Extreme Programming (XP)
Scrum
Lean Software Development
Feature-Driven Development
Agile Unified Process
Crystal
Dynamic Systems Development Model (DSDM) 


JAVA QUESTIONS

What is Anonymous Inner Classes?
As the name suggests ,  word anonymous means not identified with name. So, there is no name of the anonymous inner classes , and their type must be either a subclass of the named type or an implementer of the named interface.
Example of Anonymous class below  :
class Apple {
    public void iphone() {
        System.out.println("iphone");
    }
}
class Mobile {
    Apple apple = new Apple() {
        public void iphone() {
            System.out.println("anonymous iphone");
        }
    };
An anonymous inner class is always treated like a statement in the class code , and remember to close the statement after the class definition with a curly brace. It is rare to found the curly braced followed by semi colon in java .
When finally block is NOT called?
Finally is the block of code that executes always. The code in finally block will execute even if an exception is occurred. Finally block is NOT called in following conditions
If the JVM exits while the try or catch code is being executed, then the finally block may not execute. This may happen due to System.exit() call.
if the thread executing the try or catch code is interrupted or killed, the finally block may not execute even though the application as a whole continues.
If a exception is thrown in finally block and not handled then remaining code in finally block may not be executed.

Tuesday, 24 February 2015

Testing Concepts

7. What qualities would you look for while hiring a test engineer?

- Test to break attitude
- Ability to put self in customer's shoes
- Desire for quality and attention to details.
- Tact and diplomacy while dealing with others.
 
- Ability to communicate on technical lines with development team and on non-technical lines with the customer.
- Good understanding of SDLC
- Good judgment skills are needed to assess high-risk areas of an application.

 8. Rapid Application Development?

Rapid Application Development (RAD) is formally a parallel development of functions and subsequent integration. Components/functions are developed in parallel as if they were mini projects, the developments are time-boxed, delivered, and then assembled into a working prototype. This can very quickly give the customer something to see and use and to provide feedback regarding the delivery and their requirements. Rapid change and development of the product is possible using this methodology. However the product specification will need to be developed for the product at some point, and the project will need to be placed under more formal controls prior to going into production.


What is Marker interface? How is it used in Java?
The marker interface is a design pattern, used with languages that provide run-time type information about objects. It provides a way to associate metadata with a class where the language does not have explicit support for such metadata. To use this pattern, a class implements a marker interface, and code that interact with instances of that class test for the existence of the interface. Whereas a typical interface specifies methods that an implementing class must support, a marker interface does not do so. The mere presence of such an interface indicates specific behavior on the part of the implementing class. There can be some hybrid interfaces, which both act as markers and specify required methods, are possible but may prove confusing if improperly used.
 Java utilizes this pattern very well and the example interfaces are:
·        java.io.Serializable
·        java.rmi.
·        java.lang.
·        javax.servlet.SingleThreadModel
·        java.util.EvenListener
The "instanceof" keyword in java can be used to test if an object is of a specified type. So this keyword in combination with Marker interface can be used to take different actions based on type of interface an object implements.

What is the difference between final, finally and finalize?
 “final” is the keyword to declare a constant AND prevents a class from inherting subclasses. And overriding  super class methods.
“finally” is a block of code that always executes when the try block is finished, unless System.exit() was called.
“finalize()” is an method that is invoked before an object is discarded by the garbage collector.

Monday, 23 February 2015

Testing Concepts

5. What do you mean by following?

a.)  Test Script:
- It is usually used to refer to the instructions for a particular test that will be carried out by an automated test tool.

b.) Test Specification:
- This is a document specifying the test approach for a software feature or combination or features and the inputs, predicted results and execution conditions for the associated tests.

c.) Test Suite:
- This is a collection of tests which are used to validate the behavior of an application or product.
- Usually a test Suite is a high level concept, grouping together hundreds or thousands of tests related by what they are intended to test.

6. What are 5 common problems in the software development process?

1. Bad requirements - these requirements are unclear, incomplete, too general, or not testable. They cause problems.
2. Unrealistic schedule - Expecting too much result in too less time.
 
3. Inadequate testing - lack of testing causes problem as no one knows if the system will behave as expected.
 
4. Adding new features - after development; quite common.
 
5. Poor communication within the team or with the customer.

JAVA QUESTIONS

What is difference between Executor.submit() and Executer.execute() method ?

There is a difference when looking at exception handling. If your tasks throws an exception and if it was submitted with execute this exception will go to the uncaught exception handler (when you don't have provided one explicitly, the default one will just print the stack trace to System.err). If you submitted the task with submit any thrown exception, 
checked exception or not, is then part of the task's return status. For a task that was submitted with submit and that terminates with an exception, the Future.get() will re-throw this exception, wrapped in an ExecutionException.


Define Serialization? What do you mean by Serialization in Java?

Serialization is a mechanism by which you can save or transfer the state of an object by converting it to a byte stream. This can be done in java by implementing Serialiazable interface. Serializable is defined as a marker interface which needs to be implemented for transferring an object over a network or persistence of its state to a file. Since its a marker interface, it does not contain any methods. Implementation of this interface enables the conversion of object into byte stream and thus can be transferred. The object conversion is done by the JVM using its default serialization mechanism.

DAY:4
What is Marker interface? How is it used in Java?
The marker interface is a design pattern, used with languages that provide run-time type information about objects. It provides a way to associate metadata with a class where the language does not have explicit support for such metadata. To use this pattern, a class implements a marker interface, and code that interact with instances of that class test for the existence of the interface. Whereas a typical interface specifies methods that an implementing class must support, a marker interface does not do so. The mere presence of such an interface indicates specific behavior on the part of the implementing class. There can be some hybrid interfaces, which both act as markers and specify required methods, are possible but may prove confusing if improperly used.
 Java utilizes this pattern very well and the example interfaces are:
·        java.io.Serializable
·        java.rmi.
·        java.lang.
·        javax.servlet.SingleThreadModel
·        java.util.EvenListener
The "instanceof" keyword in java can be used to test if an object is of a specified type. So this keyword in combination with Marker interface can be used to take different actions based on type of interface an object implements.

What is the difference between final, finally and finalize?
 “final” is the keyword to declare a constant AND prevents a class from inherting subclasses. And overriding  super class methods.
“finally” is a block of code that always executes when the try block is finished, unless System.exit() was called.
“finalize()” is an method that is invoked before an object is discarded by the garbage collector.


Sunday, 22 February 2015

Testing Concepts

5. What do you mean by following?

a.)  Test Script:
- It is usually used to refer to the instructions for a particular test that will be carried out by an automated test tool.

b.) Test Specification:
- This is a document specifying the test approach for a software feature or combination or features and the inputs, predicted results and execution conditions for the associated tests.

c.) Test Suite:
- This is a collection of tests which are used to validate the behavior of an application or product.
- Usually a test Suite is a high level concept, grouping together hundreds or thousands of tests related by what they are intended to test.

6. What are 5 common problems in the software development process?


1. Bad requirements - these requirements are unclear, incomplete, too general, or not testable. They cause problems.
2. Unrealistic schedule - Expecting too much result in too less time.
 
3. Inadequate testing - lack of testing causes problem as no one knows if the system will behave as expected.
 
4. Adding new features - after development; quite common.
 
5. Poor communication within the team or with the customer.