Pages

Saturday 7 March 2015

Testing Concepts

29. What are the tables in test plans?
Test design, scope, test strategies, approach are various details that Test plan document consists of.
Test case identifier
Scope
Features to be tested
Features not to be tested
Test strategy & Test approach
Test deliverables
Responsibilities
Staffing and trainings
Risk and Contingencies.
30. What is the difference between UAT (User Acceptance Testing) and System testing?
System Testing: System testing is finding defects when the system under goes testing as a whole, it is also known as end to end testing. In such type of testing, the application undergoes from beginning till the end.

UAT: User Acceptance Testing (UAT) involves running a product through a series of specific tests which determines whether the product will meet the needs of its users. 

JAVA QUESTIONS

What is use of This keyword and Super Keyword?
THIS:
Here is given the 6 usage of java this keyword.
·        this keyword can be used to refer current class instance variable.
·        this() can be used to invoke current class constructor.
·        this keyword can be used to invoke current class method (implicitly)
·        this can be passed as an argument in the method call.
·        this can be passed as argument in the constructor call.
·        this keyword can also be used to return the current class instance.
SUPER
·        super is used to refer immediate parent class instance variable.
·        super() is used to invoke immediate parent class constructor.
·        super is used to invoke immediate parent class method.


What is Annotation in Servlet?
Annotation represents the metadata. If you use annotation, deployment descriptor (web.xml file) is not required. But you should have tomcat7 as it will not run in the previous versions of tomcat. @WebServlet annotation is used to map the servlet with the specified name.

Friday 6 March 2015

Vmware installation


Ø  Run the Vmware application


Ø  Click the next button to continue
Ø  select  the  installation type you want as below
4)select the path the VMware to be installed
4)select the path the VMware to be installed
Ø  for more performance check in the below box then click continue
Ø   for shortcut in desktop check in the below box  and click continue


Ø   click continue for continue

Ø  Then the process will be processed
 Ø   click the finish buttion finally
Visit:www.sssedu.in

Testing Concepts

27. What is verification and validation?
Verification is a process of evaluating software  at development phase and to decide whether the product of a given  application satisfies the specified requirements. Validation is the process of evaluating software at the end of the development process and to check whether it meets the customer requirements.
28. What are different test levels?
There are four test levels
Unit/component/program/module testing
Integration testing
System testing
Acceptance testing.









Oracle Training in Chennai Auto startup and shutdown of database

Ø  We are going to automatically startup and shutdown oracle database in linux server

In the first picture I didn’t startup any of my database,this can be checked by the below  linux command  “ps  –ef|grep pmon
Ø  Give sid name,ORACLE_HOME path,Y/N  in the “ /etc/oratab file as given in the picture

·         If we give Y the database will be startup automatically when server starts
·         If we give N the database will not be startup when server starts…
Ø  create the file in the “/etc/init.d” path with any name, I created the file with the name of “sssora”(your choice)

·         save  the commands in the  <sssora> file as show In the below picture

·         give the execution permission to that file using  “chmod  +x  sssora”
Ø  after that add the file to the startup and shutdown process of the server using the chkconfig command


                              “chkconfig  --add sssora”
Ø  using the same command add the file to diffent run levels


in the below command I added the sssora file to start the database in the runlevel  3&5 by giving the
command “chkconfig  --level  35 sssora on
Ø  by using the same command we can add the sssora file to shutdown the database at run levels 0&6 when the server shutdowns… 
                      command  “ chkconfig –level 06 sssora off ”
Ø  reboot the server to check the configuration
Ø  see our database is startupped automatically whn the server starts…..


JAVA QUESTIONS

Differencre between ArrayList and Vector List?
·         ArrayList and Vector both having same data structure internally, which is Array
·         Vector is by default synchronized, means at a time only one thread can access its methods from out side, where as ArrayList is non-synchronized means N number of threads can access at a time
·         But we can make ArrayList as synchronized by using Collections class, see it bellow
·         Both Vector and ArrayList  have capability to re-size dynamically, means Vector will Doubles the size of its array when its size increased, but ArrayList increased by Half only
How to Sort a Array List in Java?
import java.util.ArrayList;
import java.util.Collections;

public class SortingArrayList {
     public static void main(String args[]){
        ArrayList<String> al = new ArrayList<String> ();
             al.add("sai");
            al.add("sri");
            al.add("arun");
            al.add("john");
            al.add("babu");
            al.add("athish");
             System.out.println("Printing List before sorting......");
             for(String value: al){
                 System.out.println(value);
             }   Collections.sort(al);
              System.out.println("Printing List after sorting......");
             for(String value: al){
                System.out.println(value);
             }
}

}

Thursday 5 March 2015

Testing Concepts

25. In white box testing what do you verify?
In white box testing following steps are verified.
Verify the security holes in the code
Verify the incomplete or broken paths in the code
Verify the flow of structure according to the document specification
Verify the expected outputs
Verify all conditional loops in the code to check the complete functionality of the application
Verify the line by line coding and cover 100% testing
26. What is the difference between static and dynamic testing?
Static testing: During Static testing method, the code is not executed and it is performed using the software documentation.
Dynamic testing:  To perform this testing the code is required to be in an executable form.






JAVA QUESTIONS

Difference between Extends and Implements?
·         When a subclass extends a class, it allows the subclass to inherit (reuse) and override code defined in the supertype.
  • When a class implements an interface, it allows an object created from the class to be used in any context that expects a value of the interface.
Aggregation in Java?
If a class have an entity reference, it is known as Aggregation. Aggregation represents HAS-A relationship.
Consider a situation, Employee object contains many informations such as id, name, emailId etc. It contains one more object named address, which contains its own informations such as city, state, country, zipcode etc.
What is singleton design pattern?
A singleton is a class that is instantiated only once. This is typically accomplished by creating a static field in the class representing the class. A static method exists on the class to obtain the instance of the class and is typically named something such as getInstance(). The creation of the object referenced by the static field can be done either when the class is initialized or the first time that getInstance() is called. The singleton class typically has a private constructor to prevent the singleton class from being instantiated via a constructor. Rather, the instance of the singleton is obtained via the static getInstance() method
Visit:www.sssedu.inhttp://sssedu.in/java-training-in-chennai.html

Wednesday 4 March 2015

Testing Concepts

21. What is DRE?
To measure test effectiveness a powerful metric is used to measure test effectiveness known as DRE (Defect Removal Efficiency).
 From this metric we would know how many bugs we have found from the set of test cases. Formula for calculating DRE is
DRE=Number of bugs while testing  / number of bugs while testing + number of bugs found by user
22. What are Test comparators?
Is it really a test if you put some inputs into some software, but never look to see whether the software produces the correct result? The essence of testing is to check whether the software produces the correct result, and to do that, we must compare what the software products to what it should produce.
A test comparator helps to automate aspects of that comparison.








JAVA QUESTIONS

DAY:12
What is ServletConfig?
·         ServletConfig available in javax.servlet.*; package
·         ServletConfig object is one per servlet class
·         Object of ServletConfig will be created during initialization process of the servlet
·         This Config object is public to a particular servlet only
·         Scope: As long as a servlet is executing, ServletConfig object will be available, it will be destroyed once the servlet execution is completed.
·         We should give request explicitly, in order to create ServletConfig object for the first time
·         In web.xml – <init-param> tag will be appear under <servlet-class> tag
What is ServletContext?
·         ServletContext available in javax.servlet.*; package
·         ServletContext object is global to entire web application
·         Object of ServletContext will be created at the time of web application deployment
·         Scope: As long as web application is executing, ServletContext object will be available, and it will be destroyed once the application is removed from the server.
·         ServletContext object will be available even before giving the first request
·         In web.xml – <context-param> tag will be appear under <web-app> tag

Tuesday 3 March 2015

Testing Concepts

23. What is exploratory testing?
 Exploratory testing is a hands-on approach in which testers are involved in minimum planning and maximum test execution. The planning involves the creation of a test charter, a short declaration of the scope of a short (1 to 2 hour) time-boxed test effort, the objectives and possible approaches to be used.
The test design and test execution activities are performed in parallel typically without formally documenting the test conditions, test cases or test scripts. This does not mean that other, more formal testing techniques will not be used.
 For example, the tester may decide to use boundary value analysis but will think through and test the most important boundary values without necessarily writing them down. Some notes will be written during the exploratory-testing session, so that a report can be produced afterwards.
24. What is white box testing and list the types of white box testing?
White box testing technique involves selection of test cases based on an analysis of the internal structure (Code coverage, branches coverage, paths coverage, condition coverage etc.)  Of a component or system. It is also known as Code-Based testing or Structural testing.  Different types of white box testing are
Statement Coverage
Decision Coverage




JAVA QUESTIONS

What are available drivers in JDBC?
JDBC technology drivers fit into one of four categories:
1.     A JDBC-ODBC bridge provides JDBC API access via one or more ODBC drivers. Note that some ODBC native code and in many cases native database client code must be loaded on each client machine that uses this type of driver. Hence, this kind of driver is generally most appropriate when automatic installation and downloading of a Java technology application is not important. For information on the JDBC-ODBC bridge driver provided by Sun, see JDBC-ODBC Bridge Driver.

2.     A native-API partly Java technology-enabled driver converts JDBC calls into calls on the client API for Oracle, Sybase, Informix, DB2, or other DBMS. Note that, like the bridge driver, this style of driver requires that some binary code be loaded on each client machine.

3.     A net-protocol fully Java technology-enabled driver translates JDBC API calls into a DBMS-independent net protocol which is then translated to a DBMS protocol by a server. This net server middleware is able to connect all of its Java technology-based clients to many different databases. The specific protocol used depends on the vendor. In general, this is the most flexible JDBC API alternative. It is likely that all vendors of this solution will provide products suitable for Intranet use. In order for these products to also support Internet access they must handle the additional requirements for security, access through firewalls, etc., that the Web imposes. Several vendors are adding JDBC technology-based drivers to their existing database middleware products.

4.     A native-protocol fully Java technology-enabled driver converts JDBC technology calls into the network protocol used by DBMSs directly. This allows a direct call from the client machine to the DBMS server and is a practical solution for Intranet access. Since many of these protocols are proprietary the database vendors themselves will be the primary source for this style of driver. Several database vendors have these in progress.

What is the Difference between Externalizable and Serializable Interfaces?

Serializable is a marker interface therefore you are not forced to implement any methods, however Externalizable contains two methods readExternal() and writeExternal() which must be implemented. Serializable interface provides a inbuilt serialization mechanism to you which can be in-efficient at times. However Externilizable interface is designed to give you greater control over the serialization mechanism. The two methods provide you immense opportunity to enhance the performance of specific object serialization based on application needs. Serializable interface provides a default serialization mechanism, on the other hand, Externalizable interface instead of relying on default Java Serialization provides flexibility to control this mechanism. 

Monday 2 March 2015

Testing Concepts

19. When do we prepare RTM (Requirement traceability matrix), is it before test case designing or after test case designing?
It would be before test case designing. Requirements should already be traceable from Review activities since you should have traceability in the Test Plan already. This question also would depend on the organization.
 If the organizations do test after development started then requirements must be already traceable to their source. To make life simpler use a tool to manage requirements.
20. Why we split testing into distinct stages?
We split testing into distinct stages because of following reasons,
Each test stage has a different purpose
It is easier to manage testing in stages
We can run different test into different environments
Performance and quality of the testing is improved using phased testing.







JAVA QUESTIONS

What is the difference between sleep(), suspend() and wait() ?
Thread.sleep() takes the current thread to a "Not Runnable" state for specified amount of time. The thread holds the monitors it has acquired. For example, if a thread is running a synchronized block or method and sleep method is called then no other thread will be able to enter this block or method. The sleeping thread can wake up when some other thread calls t.interrupt on it. Note that sleep is a static method, that means it always affects the current thread (the one executing sleep method). A common mistake is trying to call t2.sleep() where t2 is a different thread; even then, it is the current thread that will sleep, not the t2 thread. thread.suspend() is deprecated method. Its possible to send other threads into suspended state by making a suspend method call. In suspended state a thread keeps all its monitors and can not be interrupted. This may cause deadlocks therefore it has been deprecated. object.wait() call also takes the current thread into a "Not Runnable" state, just like sleep(), but with a slight change. Wait method is invoked on a lock object, not thread.

What are the alternatives to Serialization? If Serialization is not used, is it possible to persist or transfer an object using any other approach?
In case, Serialization is not used, Java objects can be serialized by many ways, some of the popular methods are listed below:

·        Saving object state to database, this is most common technique used by most applications. You can use ORM tools (e.g. hibernate) to save the objects in a database and read them from the database.
·        Xml based data transfer is another popular mechanism, and a lot of XML based web services use this mechanism to transfer data over network. Also a lot of tools save XML files to persist data/configurations.
·        JSON Data Transfer - is recently popular data transfer format. A lot of web services are being developed in JSON due to its small footprint and inherent integration with web browser due to JavaScript format.   


Sunday 1 March 2015

Testing Concepts

17.  When should testing be stopped?
It depends on the risks for the system being tested. There are some criteria bases on which you can stop testing.
Deadlines (Testing, Release)
Test budget has been depleted
Bug rate fall below certain level
Test cases completed with certain percentage passed
Alpha or beta periods for testing ends
18. Why we use decision tables?
The techniques of equivalence partitioning and boundary value analysis are often applied to specific situations or inputs. However, if different combinations of inputs result in different actions being taken, this can be more difficult to show using equivalence partitioning and boundary value analysis, which tend to be more focused on the user interface.
The other two specification-based techniques, decision tables and state transition testing are more focused on business logic or business rules. A decision table is a good way to deal with combinations of things (e.g. inputs).

This technique is sometimes also referred to as a 'cause-effect' table. The reason for this is that there is an associated logic diagramming technique called 'cause-effect graphing' which was sometimes used to help derive the decision table.

JAVA QUESTIONS

What are the types of statements in JDBC?
The JDBC API has 3 Interfaces,
·        Statement,
·        PreparedStatement,
·        CallableStatement
 The key features of these are as follows:
Statement
This interface is used for executing a static SQL statement and returning the results it produces.
The object of Statement class can be created using Connection.createStatement() method.
PreparedStatement
A SQL statement is pre-compiled and stored in a PreparedStatement object.
This object can then be used to efficiently execute this statement multiple times.
The object of PreparedStatement class can be created using Connection.prepareStatement() method. This extends Statement interface.
CallableStatement
This interface is used to execute SQL stored procedures.
This extends PreparedStatement interface.
The object of CallableStatement class can be created using Connection.prepareCall() method.

What is Connection pooling? What are the advantages of using a connection pool?
Connection Pooling is a technique used for sharing the server resources among requested clients. It was pioneered by database vendors to allow multiple clients to share a cached set of connection objects that provides access to a database.
Getting connection and disconnecting are costly operation, which affects the application performance, so we should avoid creating multiple connection during multiple database interactions. A pool contains set of Database connections which are already connected, and any client who wants to use it can take it from pool and when done with using it can be returned back to the pool.

Apart from performance this also saves you resources as there may be limited database connections available for your application.