Subscribe by Email


Showing posts with label Points. Show all posts
Showing posts with label Points. Show all posts

Sunday, August 5, 2012

What is meant by Synchronization? How do you implement it in WinRunner?


The field of computer science has to deal with not one but two types of synchronization processes namely:
  1. Synchronization of processes called process synchronization and
  2. Synchronization of data called data synchronization.
Both of these two synchronization processes are quite different from each other but are related in a way. 
- In the synchronization of the processes, a certain number of processes have to come together and join in order to commit a certain action or reach an agreement. 
whereas,
- In the synchronization of the data the idea followed is of the data integration i.e., the integrity of the data is maintained by multiple copies of the data set kept in coherence with each other.

Now coming to their relation, these two distinct synchronization processes are related in the way that the former process i.e. the data synchronization can only be achieved by process synchronization primitives.
In process synchronization two particular mechanisms are applied in concurrency for ensuring that the execution of the specific portions of a software program at the same instant of time by the execution of the two concurrent processes or threads does not takes place. 

The process synchronization is quite often used in controlling the access in the following:
  1. Multi- processing systems that are small scale.
  2. Multi- processor computers and
  3. Multi- threaded environment
  4. Distributed computers that are constituted by 1000 of units.
  5. Banking systems
  6. Web servers
  7. Data base systems and so on.
Now coming to the data synchronization, there are several examples such as the following:
1. Cluster file systems in a computing cluster
2. File synchronization
3. RAID
4. Cache coherency
5. Journaling
6. Data base replication

How is Synchronization implemented in Win Runner?

- Synchronization also exists in winrunner.
- There exists a certain synchronization point in the test script whose responsibility is to give the instructions to the winrunner regarding the suspension and continuation of the tests that are running until the software system or application that is under testing is ready for release.
- With the help of these synchronization points most of the anticipated timing problems can be solved.
- During the analog testing, the role of the synchronization point is to make sure that the window is re-positioned at a specific location by the winrunner software. 
- When a corresponding test is run, the mouse cursor is expected to move across the defined coordinates and this re-positioning of the window helps the cursor to make exact contact and that too with the proper elements of the window.
- At the point of synchronization a mismatch between the speeds of the script execution and application are witnessed.
- Three types of synchronization points have been defined:
  1. Screen area bitmap
  2. Object/ window bitmap
  3. Object/ window property
- Another role of the synchronization point is to start and stop the application as and when required till the load of a certain user event gets completed.
- Whenever there is a difference in the speeds of the application speed and the tool speed then the synchronization process is always preferred for syncing of both the application and tool to match.
- There are certain functions called wait functions available for the same purpose as the synchronization points but it is always better to go with the synchronization points since they are capable of maintaining better uniformity among the test scripts and application. 
- For example the synchronization can be carried out for:
  1. Retrieving the information from data base.
  2. For making a progress bar complete 100 % and so on. 


Thursday, October 6, 2011

Some details about Pointers in C...

There was a need for a kind of variable that could store the address of another variable, so that the value of he variable could be directly accessed through its memory address and could be manipulated more easily and in a short span of time. The “pointer” is such a variable invented. It can be defined as a variable which stores the address of another variable. A pointer can be declared easily as shown below:

int *ptr1;

The “int” keyword is used to tell compiler that the pointer “ptr1” will store the memory address of an integer type variable. The symbol “*” called asterisk is used to tell the compiler that the variable “ptr1” is actually a pointer and that it will store the address of the variable it is pointing to irrespective of the bytes it will require to store the memory address. The pointer “ptr1” is said to point to an integer variable. N the above declaration we didn’t provide ptr1 with a value i.e., it’s empty now. If the declaration is made outside the function, the pointer “ptr1” will be initialized to a value that will not point to any of the variables or objects in a C program. Pointers initialized in this manner are said to have a null value or are called as “null” pointers. Null pointers are very useful in many of the C programs as they prevent system crash. A null pointer is implemented using a macro. The macro used is called “NULL” macro. If you set the value of a pointer using the above mentioned macro through an assignment statement as shown below:

Ptr1 = NULL;

It is assured that the pointer is now having a null value or it has become a null pointer. A null pointer can be tested using the below given statement

if (ptr 1== NULL);

Now suppose we want to store the address of an integer a in the above declared pointer “ptr1”, we will use the following statement:

ptr1 = &a;

Before proceeding further, we should now that a pointer has two values attached to it. One is the “l value” and the other one is the “r value”. L value is where the address of the variable pointed to is stored. R value stores the value of that variable. Now, the function of the “&” operator is to retrieve this l value of the variable a. the assignment operator copies the address of the variable a to the pointer “ptr1”. Now the pointer “ptr1” is said to point to variable “a”.

The “*” operator is also called the dereferencing operator and is used for de-referencing as follows:

*ptr 1 = 10;

The above statement will copy the value “10” to the address of variable a pointed to by the pointer “ptr1”. The above assignment statement can be written in another way as shown below:

Printf ( “ % d \n ”, *ptr1 );

The above statement will also print the value stored in the pointer on the screen as output.

Pointers are very much essential nowadays in programs. They solve basically two problems avoiding many other problems that may follow. First problem that they solve is that they make it easy to share information and data through and from the different sections of the memory. Secondly, they solve the problem of having complex structures. They make it easy to have linked data structures namely linked lists and queues and also binary trees. Pointers reduce the complexity of the program and there are many things that one can do using only pointers. Pointers are by no doubt a powerful C construct.


Monday, January 17, 2011

The COCOMO II (Constructive Cost Estimation Model) Model

COCOMO II is an extension to the COCOMO model. COCOMO II takes into account new development processes, increased flexibility in software development, need for decision making with incomplete information and new data about projects.

COCOMO II is really three different models :
- The Application Composition Model used for prototyping.
- The Early Design Model used when requirements are available but design has not yet started.
- The Post-Architecture Model used once the system architecture has been designed.

COCOMO II models require sizing information. Three different sizing options are available as part of the model hierarchy i.e. object points, function points, and lines of source codes.
The application composition model uses object points which is an indirect software measure that is computed using counts of the number of screens, reports and components likely to be required to build the application.

DIFFERENCES BETWEEN COCOMO I AND COCOMO II


- COCOMO I requires software size in KDSI as an input, but COCOMO II is based on KSLOC.
- COCOMO I provides point estimates of effort and schedule, but COCOMO II provides likely ranges of estimates.
- In COCOMO II, the estimation equation exponent is determined by five scale factors instead of three.
- Data points in COCOMO I: 63 and COCOMO II: 161.
- COCOMO II adjusts for software reuse and re-engineering but COCOMO I made little accommodation for these factors.


Tuesday, September 28, 2010

Different testing activities in Programming/Construction and Operations and Maintenance Phase

The main testing points in this phase are:
- Check the code for consistency with design
The areas to check include modular structure, module interfaces, data structures, functions, algorithms and I/O handling.

- Perform the testing process in an organized and systematic manner with test runs dated, annotated and saved.
A plan or schedule can be used as a checklist to help the programmer organize testing efforts. If errors are found and changes are made to the program, all tests involving the erroneous segment must be re-run and recorded.

- Asks some challenges for assistance
Some independent party, other than the programmer of the specific part of the code should analyze the development product at each phase. The programmer should explain the product to the party who will then question the logic and search for errors with a checklist to guide the search. This is needed to locate errors the programmer has overlooked.

- Use available tools
The programmer should be familiar with various compilers and interpreters available on the system for the implementation language being used because they differ in their error analysis and code generation capabilities.

- Apply stress to the program
Testing should exercise and stress the program structure, the data structures, the internal functions and the externally visible functions or functionality. Both valid and invalid data should be included in the test set.

- Test one at a time
Pieces of code, individual modules and small collections of modules should be exercised separately before they are integrated into the total program, one by one. Errors are easier to isolate when the number of potential interactions should be kept small. Instrumentation-insertion of the some code into the program solely to measure various program characteristics can be useful here.

- Measure testing coverage/ When should testing stop?
If errors are still found every time the program is executed, testing should continue. Because errors tend to cluster, modules appearing particularly error-prone require special scrutiny. The metrics used to measure testing thoroughness include statement testing, branch testing and path testing. Statement testing is the coverage metric most frequently used as it is relatively simple to implement.

Testing Activities in Operations and Maintenance Phase


Correctness, modifications and extensions are bound to occur even for small programs and testing is required every time there is a change. Testing during maintenance is termed regression testing. The test set, test plan, and the test results for the original program should exist. Modifications must be made to accommodate the program changes, and then all portions of the program affected by the modifications must be re-tested. After regression testing is complete, the program and test documentation must be updated to reflect the changes.


Wednesday, August 25, 2010

Overview and Features of Installation Testing

Installation testing occurs outside the development environment. Installation testing can be compared as introducing a guest in your home. The new guest should be properly introduced to all the family members in order to feel him comfortable. Installation of new software is also quite like above example.
The customer will be happy if your installation is successful on the new system but if the installation fails then the program will not work on that system.
Testing application to make sure that it is working is a crucial step. You should check whether the application doing what it is suppose to do? Secondly, run three-four invocations of this application and check memory, CPU load, etc. Third, are other normal applications, hardware, etc working fine?

Installation testing should take care of the following points: -
- To check if while installing product checks for the dependent software / patches say Service pack3.
- The product should check for the version of the same product on the target machine.
- Installer should give a default installation path say “C:\programs\.”
- Installer should allow user to install at location other then the default installation path.
- Check if the product can be installed “Over the Network”.
- Installation should start automatically when the CD is inserted.
- Installer should give the remove / Repair options.
- When uninstalling, check that all the registry keys, files, Dll, shortcuts, active X components are removed from the system.
- Try to install the software without administrative privileges (login as guest).
- Try installing on different operating system.
- Try installing on system having non-compliant configuration such as less memory / RAM / HDD.


Facebook activity