Subscribe by Email


Showing posts with label Events. Show all posts
Showing posts with label Events. Show all posts

Monday, September 2, 2013

Application areas of leaky bucket algorithm and token bucket algorithm

In this article we discuss about the applications of the leaky bucket algorithm and the token bucket algorithm.  

Applications of Leaky Bucket Algorithm
- The leaky bucket algorithm is implemented in different versions. 
- For example, the generic cell rate algorithm is a version of this algorithm which is often implemented in the networks using ATM (asynchronous transfer mode).  
- The algorithm is applied at the user interfaces in the usage/network parameter control in order to provide protection to the network from the problems of congestive collapse or excess traffic. 
- An algorithm equivalent to the generic cell rate algorithm might be used in shaping the transmissions made by the network interface card to a network using ATM. 
There are two major applications of the leaky bucket algorithm. 
- The first is using it as a counter only for checking whether the events or the traffics confirm to the defined limits or not.
- Whenever a packet arrives at the check point, the counter is incremented. 
This is same as adding water to the bucket in an intermittent way. 
- In the same way, the counter is decremented as the water leaks out at a constant rate. 
- Because of this, the conformance of the packet to the burstiness and bandwidth limits is indicated by the value of this counter whenever a packet arrives. 
- Or if an event occurs, the counter checks whether it confirms to the peak and average rate limits. 
- So, when the packets arrive or an event occurs, water is added to the bucket and then leaks out. We call this version of the leaky bucket algorithm as a meter.
- Another application of the leaky bucket algorithm involves its use as queue implemented for controlling the flow of traffic. 
- This queue maintains a direct control over the flow. 
- When the packets arrive, they are put in to the queue. 
- This is same as adding water to the bucket. 
- The packets are then removed in the order they arrived at a constant rate. 
This is same as water leaking out. 
- As a result of this, there is no jitter or burstiness in the traffic flow.

Applications of Token Bucket Algorithm
- The token bucket algorithm finds its application in the telecommunications and packet switched computer networks.
- This algorithm is implemented for checking whether the data transmissions confirm to the burstiness and bandwidth predefined limits. 
- The token bucket algorithm used in traffic policing and traffic shaping. 
- In the former, the packets that are non-conformant are discarded or assigned low priorities. 
- This is done for the management of the downstream traffic. 
- On the other hand, the packets are kept in delay unless they are conformed in traffic shaping. 
- Both of these are used in protecting the network against the burstiness of the traffic. 
- Bursty traffic gives rise to congestion problems. 
- These algorithms help in managing the bandwidth as well congestion of the network. 
- Network interfaces commonly use the traffic shaping process for preventing the discarding of the transmissions by the network’s traffic management functions. 
- This algorithm is based up on the analogy of a bucket with fixed capacity. 
Tokens are added to this bucket at a fixed rate and represent a single packet of a fixed size. 
- When the packet has to be checked whether it confirms to the predefined limits or not, first the bucket is checked if it contains sufficient tokens. 
- If sufficient tokens are there, tokens equal to the number of bytes in the packet are removed and the packet is transmitted. 
- If sufficient tokens are not there, the packet is said to be non-conformant and the number of tokens in the bucket remain unchanged.




Saturday, August 31, 2013

What is the difference between leaky bucket algorithm and token bucket algorithm?

- Telecommunications networks and the packet switched computer networks make use of the leaky bucket algorithm for checking the data transmissions. 
This check is carried out in the form of packets. 

About Leaky Bucket Algorithm
- This algorithm is used for determining whether the data transmissions confirm to the limits that have been defined for the burstiness and bandwidth. 
Leaky bucket counters also use the leaky bucket algorithm for detecting the peak or the average rate of the stochastic or random events and processes and if they are exceeding the predefined limits. 
We shall take analogy of a bucket for explaining this algorithm.
Consider a bucket having a hole in its bottom through which the water it has will leak away. 
- The rate of leakage is constant if it is not empty. 
- We can intermittently add water to it that is in short bursts. 
- But if a large amount of water is added to it in one go, the water will exceed the bucket’s capacity and overflow will occur. 
- Hence, it is determined using this leaky bucket algorithm that whether or not adding water to it will make up the average rate or will exceed it. 
- Leak rate sets the average rate of adding the water and depth of the bucket decides the amount of water to be added. 
- Asynchronous transfer mode networks use the generic cell rate algorithm which is one of the versions of the leaky bucket algorithms. 
- At the user network interfaces, these algorithms are used in the usage/ network parameter control. 
- The algorithm is also used in network-network interfaces and inter-network interfaces for protecting networks from the overwhelming traffic levels through the connections in the network. 
- A network interface card can be used on a network using ATM for shaping the transmissions. 
- This network interface card might use an equivalent of the generic cell rate algorithm or this algorithm itself.
The leaky bucket algorithm can be implemented in two different ways both of which are mentioned in the literature. 
- It appears as if there are two distinct algorithms that are together known as the leaky bucket algorithm.

About Token Bucket Algorithm

- At an interval of every 1/r seconds the token bucket algorithm adds a token to a bucket. 
- The maximum number of tokens that can be handled by a bucket are b. 
- Any token above this limit is rejected by the bucket. 
- When the bucket receives a packet from the network layer consisting of n bytes, the n numbers of tokens are taken out from the bucket and then the packet is transmitted in to the network. 
- If number of tokens available is less than n, the packet is treated as being non-conformant. 
- A bucket with a fixed capacity is associated with some virtual user and the rate at which it leaks is fixed. 
- No leakage occurs if there is nothing in the bucket. 
- Some water has to be added to the bucket in order to make the packet conform-ant. 
- No water is added to the bucket if adding this amount of water will cause the bucket to exceed its capacity. 
- Therefore, we can see that one algorithm adds something constantly to the bucket and removes also for conforming packets. 
- The other algorithm removes something constantly and adds something for confirming packets. 
- Both the algorithms are same in effectiveness and this is why the two see each the same packet as non-confirming or confirming. 
- The leaky bucket algorithm is often used as meter. 


Saturday, June 15, 2013

What is Process State Diagram?

In the systems where multiple processors or multitasking is involved, a process has to go through a number of states. In this article we shall discuss about these states. 
The kernel of the operating system may not recognize these states distinctly but still for the understanding of how the processes are executed they act as useful abstractions. 
These various states can be looked up in a process state diagram for a systematic view. This diagram shows the transitions of the process between various states with arrows. Processes can be stored both in the secondary or virtual memory and in the main memory as per the situation.

Process States

- The primary process states occur in all types of the systems. 
- Processes in these states are usually stored in the main memory. 
Basically there are 5 major states of any process as discussed below:

Ø  Created: 
- It is also known as the ‘new’ state. 
- A process occupies this state up on it creation. 
- While waiting for being admitted to the next ready state this process lies in this state. 
- The admission scheduler will decide whether to admit the process to next state or to delay it on a short or long term. 
- However, this admission is approved in an automatic way in most of the desktop computers. 
- But in the systems with real time operating systems this is not true. 
- Here, the admission might be delayed by a certain amount of time.
- If too many states are admitted to the ready state in a real time operating system, condition of over contention and over saturation might occur disabling the system to meet its deadlines.

Ø  Ready or Waiting: 
- This state is taken up a process when it has been loaded in to the physical memory of the system and is waiting to be executed by the processor or precisely waiting to be context switched by the dispatcher. 
- At any instant of time there might be a number of processes waiting for their execution. 
- Here the processes have to wait in a queue called the run queue out of which only one process will be taken up by a processor. 
- Processes that are waiting for obtaining input from some event are not put in to this ready queue.

Ø  Running: 
- When a process is selected by the CPU for execution, its state is changed to running. 
- One of the processors executes the instructions of the process one by one. 
Only one process can be run by the process at a time.

Ø Blocked: 
- When a process is blocked because of some event such as I/O operations is put in to the blocked state. 
- Another reason for a process being a blocked state can be its running out of the CPU time allocated to it.

Ø  Terminated: 
- Termination of a process may occur when either its execution is complete or it has been explicitly killed.
- This state is called the terminated or halted. 
- This process is called a zombie process if after coming in the terminated state it is not removed from the main memory. 

There are two additional states for supporting the virtual memory. In these states the process is usually stored in the secondary memory of the system:

Ø Swapped out or Waiting: 
- A process is said to be swapped out when it is removed from the primary memory and placed in the secondary memory. 
- This is done by the mid - term scheduler. 
- After this the state of this process changes to waiting.  

Ø  Swapped out and Blocked:
- In some cases, the processes that were in blocked state might be swapped out. 
- The same process might be again swapped in providing the conditions remain the same.



Wednesday, April 17, 2013

What are Real-time operating systems?


- The RTOS or a real time operating system was developed with the intention of serving the application requests that occur in real time. 
- This type of operating system is capable of processing the data as and when it comes in to the system. 
- This it does without making any buffering delays. 
- The time requirements are processed in 10ths of seconds or even on much smaller scale. 
A key characteristic feature of the real operating system is that the amount of time they take for accepting and processing a given task remains consistent. 
- The variability is so less that it can be ignored totally.

Real time operating systems also there are two types as stated below:
  1. The soft real –time operating system: It produces more jitter.
  2. The hard real – time operating system: It produces less jitter when compared to the previous one.
- The real time operating systems are driven by the goal of giving guaranteed hard or soft performance rather than just producing a high throughput. 
- Another distinction between these two operating systems is that the soft real time operating system can generally meet deadline whereas the hard real time operating system meets a deadline deterministic ally.
- For the scheduling purpose, some advance algorithms are used by these operating systems. 
- Flexibility in scheduling has many advantages to offer such as the cso (computer system orchestration) of the process priorities becomes wider.
- But a typical real time OS dedicates itself to a small number of applications at a time. 
- There are 2 key factors in any real –time OS namely:
  1. Minimal interrupt latency and
  2. Minimal thread switching latency.
- Two types of design philosophies are followed in designing the real  time Oss:
  1. Time sharing design: As per this design, the tasks are switched based up on a clocked interrupt and events at regular intervals. This is also termed as the round robin scheduling.
  2. Event – driven design: As per this design, the switching occurs only when some other event demands higher priority. This is why it is also termed as priority scheduling or preemptive priority.
- In the former designs, the tasks are switched more frequently than what is strictly required but it proves to be good at providing a smooth multi – tasking experience. 
- This gives the user an illusion that he/ she is solely using the machine. 
- The earlier designs of CPU forced us to have several cycles for switching a task and while switching it could not perform any other task. 
- This was the reason why the early operating systems avoided unnecessary switching in order to save the CPU time. 
- Typically, in any design there are 3 states of a task:
  1. Running or executing on CPU
  2. Ready to be executed
  3. Waiting or blocked for some event
- Many of the tasks are kept in the second and third states because at a time the CPU can perform only one task. 
- The number of tasks waiting to be executed in the ready queue may vary depending on the running applications and the scheduler type being used by the CPU. 
- On multi – tasking systems that are non – preemptive, one task might have to give up its CPU time to let the other tasks to be executed. 
- This leads to a situation called the resource starvation i.e., the number of tasks to be executed is more and the resources are less.


Saturday, February 23, 2013

Explain FuncUnit and QUnit - Web Functional/Regression Test Tool


FuncUnit and QUnit are both tools developed for web functional and regression testing. In this article we first discuss about the FuncUnit testing tool.

About FuncUnit Tool

- It is an open source framework and therefore free to use. 
- The API that this tool uses is based up on the JQuery.
- FuncUnit can either be used as a standalone application or a part of the JavaScript full stack framework. 
- This JavaScript framework is commonly known as the JavaScript MVC. 
Almost all the modern browsers are supported by FuncUnit on almost all the platforms such as mac, linux etc.
- The tool also offers you a choice of running the tests through selenium. 
- An integrated development environment or IDE called funcIT is also available for this tool. 
- Another component is there using which synthetic events can be created and default event behavior can be performed.
- It is known as the Syn and it can simulate events such as dragging the mouse, clicking, typing and so on. 
- Using syn complex JavaScript functional testing can also be carried out. 
FuncIT lets you do the testing directly in the browser. 
- Writing, running and debugging of the tests takes place in the web browsers. - FuncUnit makes this all so easy. 
- You just need to open a page and start the debugger. 
- FuncUnit uses syntax similar to that of the JQuery. 
- This is the perfect web testing tool for you if like short and flexible test cases.  - You can run the tests in any of the browsers and later automate them via selenium. 
- FuncUnit supports the following versions of the modern browsers:
  1. Internet explorer version 6 and above.
  2. Firefox version 2 and above.
  3. Safari version 4 and above.
  4. Chrome
  5. Opera version 9 and above.
- Platforms supported are mac, PC and Linux. 
- In other words you have a complete automated testing suite.
- Some of the features are:
1.   Functional testing
2.   High fidelity
3.   Automated
4.   Free
5.   Multi – system
6. Easy to write


About QUnit Tool

 
- QUnit is based on the similar lines as that of the junit which is a unit testing framework. 
- This testing tool works on the JavaScript test suite (that is used by the JQuery project) for testing the code. 
- It comes with various plug – ins which render it the ability to test any generic JavaScript code. 
- Though, QUnit is somewhat similar to Junit, it does uses features of JavaScript for helping with the testing chores in the web browser like starting and stopping the facilities to carry out tests for the asynchronous code. 
- QUnit is quite a powerful unit testing framework used in JQuery mobile projects, JQuery UI and so on.
- You can get QUnit from JQuery CDN and the latest release id version 1.11.0. 
John Resig is the person behind QUnit.
- Earlier in 2008, QUnit was completely dependent up on JQuery but now it can be used as a standalone application. 
- Common JSunit testing specifications are followed by the assertion methods of QUnit.
- For automated testing writing your own testing framework involves a lot of work since you have to cover all the requirements of JavaScript code. 
- QUnit makes this all easy. 
- You need to include only two QUnit files on the page namely:
QUnit.js: This is the test runner file and
QUnit.css: This styles the test suite so that the results can be displayed.

- Assertions are essential elements of all the unit tests and the QUnit provides 3 namely:
Ok()
Equal()
Deepequal()





Tuesday, January 29, 2013

What are the features of Eggplant testing tool? How is Eggplant run?


Eggplant is the GUI test automation tool that uses the black box approach in its testing process. The product stands out in the category of the GUI test automation tool and has even received US patent for its extra ordinary features. 

Features of Eggplant

The features of eggplant are:
  1. Guided record mode: This record mode is quite sophisticated in comparison to the regular mode. It generates code by means of capturing the images thus avoiding the extra and unnecessary recording of the keyboard and mouse events.
  2. Debugging
  3. Code completion
  4. Eggplant can be integrated very well with the other quality management software. It can be further used for augmenting the systems like the HP quality center.
  5. Eggplant features an execution only mode i.e., the software testers and developers have the freedom of running the tests unattended via the command line interface of the eggplant.
 It can be used for a number of testing methodologies such as:
  1. Mobile testing
  2. Cross browser testing
  3. Cross platform testing
  4. Rich internet application testing
  5. Performance testing
A free trial of eggplant software can be downloaded from the website of the company. Some additions that were made to the version 11 of the eggplant are:
  1. Integration of the OCR engine
  2. Sense talk scripting
  3. Mac OS X lion support
The mobile version of the eggplant lets the software testers to carry out automated testing on mobile devices. Eggplant mobile provided a universal solution for testing the mobile applications across a number of mobile operating systems such as the following:
  1. Android
  2. iOS
  3. blackberry
  4. Symbian
  5. Windows
- The OCR engine that was integrated in version 11 of the eggplant is a global one and also supports the latest version of the windows – windows 8. 
- The scripts developed by the eggplant are reusable. 
- The eggplant software can be made ready within an hour and you can start writing test scripts and executing them without wasting much time.

- To set up the eggplant software follow the below mentioned steps:
Ø First install the eggplant application.
Ø Now set up the system under test and install a VNC server on it.
Ø Set up a VNC connection.
ØFor a better understanding of how to use the application it is recommended that you take a tour of it.

Testing Process with Eggplant

Now we present a brief overview of the testing process with eggplant:
  1. Set up your SUT and a VNC connection as mentioned previously in the article.
  2. The SUT is controlled through eggplant so that you can capture images indicating the SUT interface elements. These are the elements with which you want the eggplant to have an interaction with.
  3. Third stage involves generation of the scripts that guide the eggplant regarding what is to be done at the image locations that you have selected.
  4. You can execute the scripts as many times as you require carrying out a particular task such as validating a process.
  5. The result is generated in the suite editor and consists of detail run info and statistics that you can use for analyzing your results.
Best thing about eggplant is that even if it can be installed only on one computer (since it comes only with one computer per license), it can test any number of other computers. The scripts are created on the controller machine from where they can be executed on any other computer. This it does through the VNC (virtual network computing) server which sends the commands to the SUT. 


Saturday, January 19, 2013

What is meant by Statistical Usage Testing?


Statistical usage testing is the testing process that is aimed at the fitness of the software system or application.
The test cases chosen for carrying out statistical usage testing mostly consist of the usage scenarios and so the testing has been named as statistical usage testing. Software quality is ensured by the extensive testing but that has to be quite efficient. Testing expenditures covers about 20 – 25 percent of the overall cost of the software project. In order to reduce the testing efforts, deploy the available testing tools since they can create automated tests. But usually what happens is that the important tests require manual intervention with the tester requiring thinking about the usage as well behavior of the software. This is just the repetition of the tasks that were done during the requirements analysis phase.

About Statistical Usage Testing

- A usage model forms the basis for the creation of tests in statistical usage testing.
- Usage model is actually a directed usage graph more like a state machine and it consists of various states and transitions. 
- Every transition state has a probability associated with it regarding the traversal of the transition when the system would be in a state that marks the beginning of the transition arc. 
- Therefore, the sum of the probabilities of outgoing transitions sum up to unity for every state.
- Every transition can be associated with an event and more with parameters that are known to trigger the particular transition. 
- Such event associated transitions can be further related to certain conditions called the guard conditions. 
- These conditions imply that the transition occurs only if the value of the event parameter satisfies the condition.
- For assigning probabilities to the transitions, 3 approaches have been defined as follows:
  1. Uninformed approach: In this approach, same probability is assigned to the exit arcs of a state.
  2. Informed approach: In this approach, a sample of user event sequences for calculating suitable properties. The sample is captured from either an earlier version of the software or its prototype.
  3. Intended approach: This approach is used for shifting the focus of the test to certain state transitions and for modeling the hypothetical users.
- According to a property termed as the marcov property, the actual state is what on which the transition probabilities are dependent. 
- However, they are independent of the history again by the property. 
- This implies that the probabilities must be fixed numbers. 
- A system based up on this property is termed as a marcov chain and it requires conclusion of some analytical descriptions. 
- Usage distribution is one among such descriptions. 
- It gives for every state its steady–state probability i.e., appearance rate that is expected.
- All the states are associated to one or the other part of the software system or application and the part of the software that attracts more attention from the tests is shown by the usage distribution. 
- Some other important descriptions are:
  1. Expected test case length
  2. Number of test cases required for the verification of the desired reliability of the software system or application.
- The idea of the usage model generation can be extended by handling guard conditions and enabling the non–deterministic behavior of the system depending on the state of the system’s data. 
- All this helps towards the application of the statistical usage testing to systems over a wide range. 
- The use cases are defined by the top–level structure of the unified modeling language (UML). 


Thursday, November 8, 2012

What is Silk Test Architecture?


Whenever the graphical user interface of any software system or application is tested, a manipulation is done to the windows, menus, buttons and so on via input sources such as key board and mouse clicks etc. 
These windows, menus, buttons and so on are nothing but the GUI objects which are interpreted by the silk test. 
Later, in the test automation process the silk test recognizes these GUI objects based up on two things that uniquely identify them namely:
  1. Object class properties and
  2. Object methods
The operations that are performed on that particular application software by the users are usually in terms of input from keyboard and mouse clicks. 
These events are simulated by the silk test and the results thus obtained are subjected to automatic verification. 
This whole process is carried out by two very distinct components of the silk test mentioned below:
  1. Silk host software and
  2. Silk agent software
Both of these components are installed on different machines: the host machine and the target machine. 
- Host machine is for the silk host software whereas target machine is for the second component of the silk test. 
- The host component plays an important role in the development of the test scripts as well as the test plan.
- Using the components the following operations can be carried out on the test scripts:
  1. Creating
  2. Editing
  3. Deleting
  4. Compiling
  5. Running
  6. Debugging etc.
- The latter component of the silk test i.e., the agent is configured to interact with the graphical user interface of the AUT or application under test. 
- The agent is responsible for monitoring as well as driving the application under test. 
- The commands in test scripts are written in the 4test language. 
- These need to be translated in to specific equivalent GUI commands. 
- This task is also achieved by the silk agent software. 
- One thing that should be taken care of is that the application under test should be installed on the same machine as of the agent and on no machine else. 
- Matching objects to that of the GUI objects are created in the 4test and each one is unique. 
- Silk test completes test automation in a period of 4 steps:
  1. Creation of a test plan
  2. Recording of the test frame
  3. Creation of the test cases
  4. Execution of the test cases and interpretation of the test results.
- The interaction between the GUI of the application and the silk test is necessary since the operations need to be submitted to the application for simulation. 
- During the simulation, the silk test is said to be the simulated user whose work is to drive the application under test. 
- Since the AUT does not recognize the difference between the simulated user and the actual user, it behaves exactly in the same way as it reacts to an actual user. 
- In addition, you can have an agent as a local agent installed on the host machine. 
- Machines other than the host machine on which agent is installed in a network are called target machines. 
- The application under test is driven by the silk test and in turn drives the server like always. 
- Silk test is quite a powerful tool and can be used to drive the GUI of a server directly by running the scripts which will send equivalent SQL scripts to the data base of the server. 
- In such a way the server application is manipulated directly thus supporting the testing involving a server being driven by a client.


Saturday, September 29, 2012

What is Reporter.ReportEvent? What is GetRoProperty? (In QTP)


In this article we are going to discuss regarding the two main things namely:
  1. Reporter. Report event and
  2. GetRoproperty
As far as the purpose of the reporter object is concerned it is used for sending or reporting the information to the results of the test. With a reporter object the following tasks can be performed:
  1. For reporting of the status of the results of the tests like success, failure, warning, error and so on.
  2. For enabling or disabling reporting of the steps that immediately follow the executed statement.
  3. For retrieving the folder path where the results of the current tests can be stored.
  4. For retrieving the execution status at the current point of the execution process.
There are many methods and properties that are associated with the reporter object and the reporter. Report event is one of them. 
Those methods and properties are as mentioned below:
  1. Reporter event method
  2. Filter property
  3. Run status property
Here the thing to be discussed is about the first one i.e., the reporter event method in detail. 
- This is the most commonly method that is used with the help of a reporter object. 
- It is certain that even if one has worked on quick test professional for a very short period of time then he/ she might have come across the use of this object. 
The syntax for using this object is as mentioned below:
Reporter. Reportevent event status, report step name, details [, image file path]

The event status can be one of the following:
  1. Mic Pass or 0: If the test step passes the run.
  2. Mic Fail or 1: If the test step fails the run.
  3. Mic done or 2: If the status of the test is not affected by the run of the test step.
  4. Mic warning or 3: If the status of the test is not affected by the run of the test step and a warning has to be issued.
- Next step i.e., the report step name represents the name of the step that is currently being executed. 
- The last aspect i.e., the details represent the details of the step as defined by the user. 
- The reporter. Report event can be used for reporting of the custom steps in the test results of the quick test professional.

- After the tests have been executed, the results can be stored in a text file or in an xls file via VBScript library functions. 
- It can be considered to be a kind of reporting mechanism of the quick test professional. 
- As the name itself specifies it means reporting an event to the test results. 

What is GetRoProperty in QTP?

- The GetRoproperty is used basically for the following two tasks:
  1. For returning the run time value or the current value of the test object property from the objects present in the software system or application.
  2. For retrieving the current property value during the run session of the object present in the software system or application.
- Actually GetRoProperty is one of the 4 methods provided by the quick test professional for working on the test object repositories and the other 3 are:
  1. GetToProperty
  2. SetToProperty
  3. GetToProperties
- Most of the developers often get confused with these methods and do not use the appropriate method for the situation. 
- For employing either of these methods, it is important that you should know and understand the details of the test object properties which can be identified by the quick test professional as a standard set of properties. 


Facebook activity