Subscribe by Email


Showing posts with label Queries. Show all posts
Showing posts with label Queries. Show all posts

Friday, September 7, 2012

How will you handle Java tree in QTP?


In this article we shall talk about how to handle java trees in quick test professional. But first let us see what a java tree actually is.

What is a Java Tree?

- Java tree is a data structure unique to java which can be used to display hierarchical data. 
- Java tree does not essentially holds or stores data rather it just provides the user with a view of the data i.e., in the way the data has been actually organized in the software system or application.
- The java tree obtains all this data by generating queries to the data model just like any other non- trivial swing component. 
- The data in a java tree is represented in a vertical manner. 
- Each row in this vertical representation displays only one data item called a node. 
- Each java tree has got it roots in the root node and this is from where all the branches of the tree descend. 
- In the default mode, the root node of a java tree is automatically displayed but this view can be modified. 
- The branch nodes are also referred to as children.
- The branch nodes can be expanded and collapsed as required. 
- Identification of a specific node in the tree can be done via a tree path. 
- A tree can be thought of as a container class that consists of elements of the type node. 
- These node elements can be thought of as thin cover over the actual data which has to be assigned some generic type. 
- These nodes cover the actual data which has to be represented by the means of a hierarchical data structure i.e., nothing but the java tree. 
- The java trees don’t become useful on their own. 
- They become useful when one can store and retrieve some tasks via them from the data base of the application.  
- Java trees are the one kind of the data structures which can represent the data in its true hierarchical manner. 
- It is possible for a node not to have any children whereas in other cases a node may have a large number of children and such nodes are referred to as branch nodes.

How to handle Java tree in QTP?

Java trees have a place in quick test professional also and now we going to discuss how to handle one. 
- For handling a java tree in quick test professional it is required that a java add–in is installed in the quick test professional. 
- In the tools menu there is one drop down list available by the name of “object identification”. 
- In this drop down list you will get one option “java” which facilitates the recognition of the objects. 
- Now from this drop down list select the tree option. 
- All you have to do is to add the properties that you want to be identified. 
- Just after doing this the quick test professional will be able to recognize the java tree. 
- If not this way you can even use DOM for the same purpose. 
- Here what you need to do is to make an appropriate code selection from the back ground and have it modified accordingly. 
- Another way can be to first select the option “JavaAdd” and then launch the quick test professional. 
- Your next step will be to record all the operations that are being performed up on the java tree. 
- If you face any problem with this way then you can try going back to the java tree object properties and modify the assistive and mandatory properties for easy identification. 
- You may face some difficulty while trying to expand all the nodes of the java tree even by using expandpath and expandrow commands.  


Saturday, July 21, 2012

What is meant by DNS? What does it contain?


DNS or domain name system is a well known distributed system which is quite hierarchical in nature and is used for the following:
  1. Computers
  2. Services
  3. Resources that are connected to some private network or internet and so on.

What does DNS contain?


- With the aid of DNS, the domain names with various participating entities contains various information. 
- A domain name system is also known as domain name service and has taken up the responsibility of resolving the queries for the above discussed domain names into the corresponding IP addresses. 
- The basic purpose of this whole process is spotting the location of devices and computer services on the World Wide Web.
- The domain name system had lately become quite an essential part of the functionality of the internet because of the world wide service it provides regarding the distributed key word based redirection. 
- To put it simply it acts as a phone book in disguise for the internet. 
- It serves as a phone book in the way that it translates the human friendly computer host names in to their corresponding IP addresses. 
For example,
The domain name: www. Abc. Com translates in to the following IP address (say): 192. 0 . 34 . 11 (IPv4) and 2630 : 0 : 2c0 : 201 : : 10 (IPv6) etc.

- Though DNS serves all the purposes of an ideal phone book in terms of the internet, it differs from the phone book in one respect which is that the DNS can be frequently updated and these updates in turn can be distributed but in phone book these tasks cannot be performed so.
- With the help of such a process the location of a particular service on a network can be easily changed without having any affect on the end users who keep on continuing with the same host name. 
-This advantage is further reaped by the users while they recite the meaningful e- mail addresses as well as the URLs (uniform resource locators) without even knowing the way via which the services are actually located by the computers. 
- With the help of domain name system, each and every domain in the network is assigned with an appropriate domain name and this domain name is mapped to corresponding IP addresses through the designation of the authoritative name servers for each and every domain. 
- These authoritative name servers hold the responsibility of their particular domains and also it helps in assigning the sub domains with their respective authoritative name servers.
- Such a mechanism has helped a lot in making the domain name system quite fault tolerant and distributed. 
- This mechanism in another way has eliminated the requirement of a single central register to be used continually for updating and consultation. 
- There is one more additional feature of the domain name system which is that the responsibility of the updating and maintenance of the master record of the domains is distributed among many domain name registrars.
- These domain name registrars are known for their competition for the domain owner’s and end user’s business. 
- The facility of moving the domains from one registrar to another has been very well provided in the domain name system.
- The technical functionality of the data base service as well as the DNS specification is also specified by the domain name system.
- This DNS protocol is a kind of detailed specification of the communication exchanges and data structures that are used in the domain name system which in turn forms a very important part of the whole internet protocol suite. 


Friday, April 13, 2012

What is a mock object? What are the reasons for use?

Perhaps most of us have heard about mock objects but do not know what it is actually! This article is dedicated to the mock objects and the reasons for which they are used.

First we will clear up the concept of mock object and then we will move on to the reasons for its use. Mock objects are a concept of the object oriented programming.

" Mock objects are defined as some simulated objects that have the ability to mimic the behavior of the real objects in a defined and controlled way. Mock objects are used by a programmer or developer to check another object by testing it against the mock object."

Reasons for use of mock objects



- Mock objects as we discussed above are able to perfectly simulate the behaviour of real or we can say non- mock object be it very simple or very complex.

- This property of the mock objects make them an essential and convenient tool for carrying out an effective unit testing which involves testing of the software program modules in isolation.

- It should not be mistaken that the mock objects are used in the place of the original non mock objects.

- They are used in their place only during the testing phase and that too when it is almost impossible and impractical to incorporate the real object in to the created unit tests.

- In some of the cases it is required the presence of some object for testing another one. In such cases the mock objects play a very important role.

Characteristics of Mock Object


Below mentioned are some characteristics which if are present in a non mock object, it is important that you use a mock object in its place:

1. If the object supplies non deterministic results such as the current temperature and current time etc.

2. If the object is having states that are somewhat difficult to be reproduced and recreated such as a network error and so on.

3. If the object is too slow i.e., if it is having a complete data base which requires initializing before the starting of the test.

4. If the object does not exist in practical.

5. If the object tends to change its behavior.

6. If the object currently does not exists.

7. If the object requires including the methods and information regarding the testing purposes but not its actual tasks.

8. If the object is difficult to set up.

9. If the object is a user interface.

10. If the object cannot be queried.

We will give an example so that the mock object concept becomes clear to you!

- Consider your mobile alarm clock which causes an alarm bell to ring at the time that you specify.
- Suppose it gets the current time from somewhere outside, then how do you test this mobile alarm?
- You will have to wait till the alarm bell goes off till that specified time to check whether or not the mobile alarm is working correctly or not.
- Mock objects are sometimes used as mediators.
- In such cases a mock domain comes in to play rather than the actual domain.

Features of Mock Object


Below mentioned are some of the features of a mock object:
- Easy to create
- Easy to set up
- It is quick
- Deterministic
- Easy to cause behavior
- Does not have any direct user interface
- Can be queried directly

The mock objects did not come in to existence in a single day. It took a whole lot of days to experiment, discuss and collaborate and put forward the idea of using a mock object.


Wednesday, March 14, 2012

What are major activities in database testing?

Before going to the main topic i.e., the major activities that are carried out in data base testing, we will first have an insight on what is data base testing actually.

WHAT IS DATABASE TESTING?

- Data base testing as it suggests itself, it is the testing of the data or values retrieved from the data base of that software system or application under testing.

- The retrieved data should match exactly with the data mentioned in the records of the data base.

- Data base testing is not an easy thing to carry out.

- It calls for a great need of expertise in reading the data base record tables, writing procedures and queries for the data base.

- Data base testing works well with all sorts of application softwares be it any application written either in SQL or Oracle languages.

- But normally, data base testing finds it way in the testing of applications that work with all sorts of sensitive data like finance, banking or health insurances etc.

- Such applications require extensive data base testing since any error in the retrieved data can cause the users lot to suffer.

MAJOR ACTIVITIES OF DATABASE TESTING
Now we are going to discuss about the working of the data base testing or what all are the major activities taking place in a data base testing.

- A lot of understanding and knowledge of the software system or application under the testing is required i.e., the tester needs to know all about the type of data base being used by the software system or application.

- All the existing data tables in the application data base are figured out.

- All the possible queries are written for the figured out tables to be executed.

- All the tables are tested individually for the verification and validation of the data contained in them.

- For complex data bases the queries are obtained from the developer and the functionalities are tested.

- The data base of a software system or application is indeed its back bone and needs to be tested thoroughly.

- In a data base testing not only the data base undergoes testing, but also the features and functionality of the software system or application.

- As if this is not enough, all the actions taking place like deletion or addition are also tested.

- The added values or data are checked against the records of the data base i.e., whether or not they are exactly same.

- The deleted is checked for whether or not it has been really deleted from the data base.

- Every action being performed is tested for its efficiency as it will affect the overall well being of the data base.

- These days with the introduction of the business logic, the data bases have become more complex.

- Though the business logic makes the whole data base complex in nature, it cannot be neglected since it plays a very crucial role in the implementation of the applications.

- After the implementation of the business rules or logic, the data base values are again checked for their correctness.

- The coupling of the data bases to the libraries also poses a problem for the data base testing besides the following:

1. Data base schemas
2. Data base tables
3. Verification of the data base after every execution of test cases.
4. Cleaning up of the data base for every new test case execution.
5. Carrying out the whole data base testing manually is absolutely impossible or perhaps a nightmare.
6. Writing short test codes that are easy to understand.

One needs to carry out data base testing very carefully and with understanding since any faltering can disrupt the whole testing process.


Saturday, October 1, 2011

Estimation Techniques - For Web Engineering Projects

Early estimation is required during planning even though there is a huge chance that these are proven wrong. Some uncertainty is unacceptable and some solid techniques and concrete procedures help reduce the inaccuracy of estimates.

Estimating techniques for web engineering projects adapt the agile process model. Along with the agile estimation approach, a modified function point (FP) measure can be used to develop an estimate for a web application. Roetzheim suggests for web application estimation, the information domain values while adapting function points are:

- Inputs include maintenance screen, input screen or form or each tab using a tab notebook.
- Outputs include static web page, dynamic web page script, each report whether web based or administrative in nature.
- Tables include logical tables in database, each XML object if XML is used to store data.
- Interfaces are logical files into our out of the system boundaries.
- Queries are a message oriented interface and they are externally published.

According to Mendes:
The best way to determine the volume of the web application is by :
- predictor variables that are associated with application like page count, function count, media count,
- web page characteristics like page complexity, linking and graphic complexity,
- media characteristics like media duration,
- functional characteristics like code length.

Empirical estimation models for:
- total project effort
- page authoring effort
- media authoring effort
- scripting effort
can be evaluated by using these measures.


Facebook activity