Subscribe by Email


Showing posts with label Modifications. Show all posts
Showing posts with label Modifications. Show all posts

Wednesday, September 12, 2012

How will you call from one action to another action in QTP?


In the test scripts produced with the help of quick test professional, one action can be called from another action. In this article we are going to discuss the same i.e., how this can be done? 

How to call from one action to another action?

- A call to a reusable action can be inserted easily that might be stored in some local test (current test) or in some external test (external test). 
- Calling one action from some other action is just like inserting an action call in an existing action or just linking it to it.
- The steps involved in this whole process can be viewed using the action view tool but they cannot be modified. 
- The local object repository of the action that has been called is read only. 
- It is not necessary that each and every calling and called action must have a local object repository. 
- It may or may not have a repository.
- If the external action that has been called has some data in the data table, you get two options:
  1. Either you take the data from the data sheet of the action and import it as a editable or local copy,
  2. Or you take the data from the original action but here the data is read only type.
- The data obtained from the global data sheet of the action that has been called is imported to the test as an editable and local copy of data.
- In order to modify an existing external action you need to open the particular test where you have the action stored and make modifications there itself. 
- These modifications will be visible in all the tests that will call that particular function. 
- If you choose to go for the second option as mentioned above then the changes that you will make will apply to original data as well. 

Step by step procedure of how a call to an action can be inserted?

  1. Go to insert menu, the select the “call to existing action” option and you will be provided with a list of actions. From that select “insert call to existing action” or you can also right click on any of the steps. The go for the action button and then click on “insert call to existing” option. Now a action properties dialog box pops up.
  2. There is a browse button called “from test” and can be used to find the test that holds the action to be called. All the reusable actions in the test that you select are displayed in this action box.
  3. From the action that is displayed select the action that is to be called and its type as well as description both are displayed if available. This type and description help you further in proper identification of the action that you wish to be called.  You can even set other properties of the actions by going to the “setting general action properties”.
  4. Now you are done with setting the properties, decide on where the function has to be inserted. For inserting the function you are provided with two options namely:
a)   After the current step or
b)   At the end of the test
There is one thing to be noted which is that if the step that is in current selection is a reusable action from some another test, then the action call is added at the end of the test automatically.
  1. Now the last step is to just clock on the OK button and you have your action inserted. This action can be moved to any other desired location by just dragging it to that position.


Sunday, May 6, 2012

Explain Test-Driven Development Cycle?


Test driven development or TDD is considered to one of the most effective as well as efficient software development methodology or process that is often cited under the category of the agile software development processes.
The term “test driven development” is self justifying as one make out from the term itself that it is driven by the tests. Actually, the test driven development process is wholly based up on the repetition process of the several development cycles that are shorter than the usual development cycles. 
This whole article is dedicated to the discussion regarding the test driven development cycle. 

What are the steps in TDD process?


Test driven development process involves the below mentioned steps:

1. First step involves the creation of an automatic test case that is failing and defines a new function or some desired improvement in the code.
2. Second step involves the production of code which can pass the test.
3. Third and the final step involves the re-factoring of the new code in order to meet the prescribed standards.

This development strategy or process was introduced in the year of 2003 by Kent beck. The first programming concepts of the extreme programming or XP are considered to be related to the concepts of the test driven development to some extent.
But, nowadays the test driven development has been observed to be an individual development methodology with its own rules and independent procedures. The test driven development process has proved to be successful in improving and debugging legacy code that has been developed using the older development techniques. 

We all know that every development process has its own requirements so here in this the requirements are the automated unit tests that provide a definition of the code requirements and create the associated code themselves. 

Test Driven Development Cycle


Now let us describe the test driven development cycle in detail and sequence:

1. Adding of a test: 
- In test driven development, for every feature to be added, first a test is written that is inevitably expected to fail since it is written before the actual implementation of the features. 
- If the test does not fail, then there are two probabilities: the test is either wrongly formulated or the feature for which the test has been created already exists. 
- The test should be written with utmost understanding of the specifications and requirements which can be achieved from the use cases and user stories. 
- An already existing test can also be modified.
- Writing unit tests before the implementation of the feature helps the software developer or program focus up on the requirements before the actual code is written. 
- This feature of the test driven development differentiates it from the others and leaves a subtle and important effect.

2. Execution of all the tests and check if they fail: 
- This step involves the validation of the test harnesses for their proper working.
- This is done to ensure that no test passes mistakenly without requirement of new code. 
- The test itself is also tested but in the negative so that all the possibilities of passing of the new test are ruled out making it worthless.

3. Production of code: 
- This step involves the production of code by virtue of which the test will pass.
- The code even if its no perfect is accepted since later it can be improved.

4. Execution of the automated tests: 
After all the tests have passed, the developer can be confident that the code is perfect.

5. Refactorization of the code: 
This involves clean up drive of the code and the tests can be re- executed in order to ensure that the existing code is not being damaged.

6. Repetition: 
This involves repetitions of the whole development cycle in order to improve functionality. 





Sunday, April 15, 2012

What is meant by refactoring of code?

Re-factoring of code or code refactoring is the topic of discussion of this article.

We can define the code refactoring technique as one of the disciplined techniques which is used for the following purposes:

- Restructuring of an existing body of the source code,
- Alteration of the internal structure of the code such that its external behavior remains the unaltered.

About Code Re-factoring



- The above two purposes are achieved by the application of a series of refactorings. - Each of the refactorings of the series is usually a tiny change in the source code of the computer program.
- The code refactoring technique is deployed for making improvements in the non – functional attributes of the software system or applications.
- A refactoring is not intended towards the modification of the functional requirements of the software system or application.

Advantages of Code Re-factoring


There are many advantages of the code re-factoring technique, few of which have been mentioned below:

- Improves the readability of the source code of the software system or application.
- Reduces the complexity of the code so as to improve it maintainability.
- Provides a more expressive object model or we can say an internal architecture for improving the extensibility and so on.

How is Re-factoring of code done?


It is obvious that with the continuous improvement in the design of the source code, it becomes better in its working and performing tasks.

- The developers, programmers and testers usually keep on adding new features in to the software system or application without performing adequate code refactoring which is quite an unhygienic technique.

- Carrying out the code re-factoring process continuously makes it easier to maintain and extend the source code of the program.

- The motivation to the code re-factoring is often provided by the code smell.

- Up on the identification of the problem, they can be effectively fixed by a series of code re-factoring.

- The code re-factoring solves the problem by simply transforming it in to a new form that possesses the same behavior as was in its previous form but the code is no longer found to “smell”.

- For re-factoring the longer routine, it is often sub divided into smaller sub routines which are then individually re-factorized.

- And for the duplicate routines, the duplicate is discarded and one shared function in its place is used.

- Technical debt is a serious consequence that can be faced if the code refactoring is not done effectively.

Categories in which benefits of code re-factoring should fall


The benefits of the code re-factoring usually fall in to two basic categories:

1. Extensibility
- After re-factoring, it becomes extremely easy for extending the capabilities of the software system or application if it makes use of design patterns that are recognizable and also provides flexibility in those parts of the program where there was no flexibility previously.

2. Maintainability

- Up on the code refactoring it becomes a lot easier to fix the errors and bugs because the readability of the code increases and then it becomes easy to grasp what the author intends to achieve.

- The maintainability is increased by the division of a monolithic routine in to individual single purpose methods and by placing them in to a more appropriate class.

- A solid set of automated unit tests is required before you start the process of code re-factoring.

- These tests will demonstrate the correctness of the module and then the whole process enters in to an iterative cycle making small program transformations each time iteration takes place.

- Whenever a test fails, you can undo the last transformation and keep on trying until you get it right. Such small transformations make your program what you want it to be!


Friday, March 9, 2012

What is the difference between re-test and regression testing?

Software re- testing and regression testing are the two concepts which are often misunderstood by the people. These two software testing concepts will be focused up on in this article. These two terms are often mistaken as the same thing but, it is not so. There is a considerable difference between the two.

Concepts of Re-testing

- As we all know, the field of software testing is continually improving, it becomes necessary to modify and re- test the existing software components to make them compatible with the new advanced technology.

- It becomes necessary to retest those old software components to check how much they have been affected by the changes and what all improvements and modifications are needed to make them at par with the new technology.

- So we see that testing a software component for another time is called re- testing.

Concepts of Regression Testing

- Testing these software components again and again for the sake of improvement and modification is what is called regression testing.

- We can formally define the regression testing as the software testing methodology that seeks to dig out new errors and bugs after the all other types of software testing have been carried out on the system and the required changes have been made to root out those bugs and flaws.

- It is mostly emphasized on testing the patches, enhancements and of course configuration changes.

- Regression testing is aimed at determining whether or not the modifications or enhancements have introduced new bugs and errors.

- Another purpose of carrying out regression testing is to ensure that the any changes in one component do not affect the functioning of the other components of the software system or application.

- Executing the already executed tests and observing the behavior as well as the outcome of the program, is the most common approach to the regression testing.

- Regression testing also sees to it that the faults that were fixed previously do not occur again.

- Regression testing like any other testing also consumes so much of time and effort.

- Therefore, in order to cut down the testing time and improve the efficiency of regression testing, the tester can select only few of the required test cases and execute them once again.

- Regression testing is the most costly software testing methodology that is ever employed in a software testing life cycle.

- An aggressive research has been carried out on the regression testing and many issues have been discovered with the regression testing.

Process may be either of deployment or development, because of both of them changes are made in the software system like adaptation to changes, enhancement of functionality and bug fixing etc.

Retesting and regression testing are seen as one of the most expensive software testing processes.

- These two testing processes can take up to 80 percent of the total budget of the software testing and accounts for 50 percent of the total project budget.

- For normal development processes, it is ok if the regression testing is carried after the changes have been made to the software system for every regular builds or before the final release of the software.

- But, for the agile development processes, the regression testing should be carried out after every time the software program is compiled and saved.

- For other types of development, the regression testing can be carried out before the release of the patches like security patches and so on.

- In whatever way or on whatever time the regression testing might be performed, its aim is always the same i.e., giving the assurance that the changes made to the software act as expected and do not affect the other components of the program.


Friday, December 2, 2011

What are different characteristics of regression testing?

The word regression means to relapse to an under develop or a less perfect state. So, we can deduce from this that the regression testing is a kind of testing that basically discovers and un-hide the hidden and new errors and flaws, after the modifications have been made in the functions, operations, patches etc. of the software system.

- Regression testing is also carried out after the software system has been configured after checking away the errors.
- Regression testing may seem like some kind of exploitation of the software system. But, it is aimed at a good objective of ensuring that any new modification or configuration did not cause some other new bugs and errors.

- It is very difficult for the software developer to figure out how a particular change that he is going to introduce will affect all the other parts of the software system. Therefore, the regression testing becomes quite necessary to maintain the quality and standard of the program.

- Sometimes, fixing an error causes some other error in some part of the software system and it will remain unattended and uncorrected until and unless regression testing is carried out.

- Regression testing can only trace and locate such hidden errors and bugs.

There are several methods for conducting regression testing.One of those methods includes re-running the tests again and again for a certain number of times and observe if the behavior, response and output of the software system has changed or not.

Regression testing is not as laborious as the other testing methodologies are.

- The hard work for regression testing can be reduced efficiently to minimum level by selecting an appropriate combination of minimum number of specified test cases for testing the software system.
- The tests should be selected as such as to give maximum coverage to the modification or the change that has to be tested.
- It has been observed that the software program being fixed leads to the re- emergence of the errors and bugs and sometimes new errors are also created.
- It happens so because the usage of the software system over the time leads to the loss of an error or a bug fix due to the poor software handling practices.

We can conclude that any fix is a bit fragile in the sense that it fixes a bug or an error temporarily but arises again after repeated usage of the program. Usually a bug fix in one part of the program causes more bugs in the other parts of the program. So more often, the software system is needs to be redesigned.

The testers require good coding skills and practices.
- Regression testing is followed through manual testing procedures and other programming methodologies.
- Regression testing is usually done by automated tools. Such an environment allows the regression testing to automatically run the test cases and report any errors and bugs.
- Extreme software programming considers regression testing as one of its most crucial integral part.
- During each stage of the cycle for software development, the design documentation is replaced by the automated testing of the whole software system. - Regression testing tests the scale of correctness of a software system and maintains its quality and keeps the output standard.
- A software development should always and compulsorily contain regression testing stage.


Thursday, March 10, 2011

What are different types of architectural styles?

Large number of computer systems are created. Some of the architectural styles are:

Data Centered Architecture
Data store resides at center of architecture and is accessed frequently by other components that update, add, delete or otherwise modify data within the store. A data centered architecture promotes integrability, which means existing components can be changed and new client components added to the architecture without concern about other clients.

Data-flow Architecture
Data flow architecture is applied when input data is to be transformed through a series of computational or manipulative components into output data. Pile and filter structure has a set of components called by filters connected by pipes that transmit data from one component to another. Each filter works independently. If data flow degenerates into a single line of transforms, it is called batch sequential.

Object Oriented Architecture
In this architecture, data and operations are encapsulated by the components of a system. Communication and coordination between components is done by message passing.

Call and Return Architecture
In this architecture, software designer achieves a program structure which is relatively easy to modify and scale. Two sub-styles exist: Main program/subprogram architecture and Remote Procedure Call Architecture.

Layered Architecture
In this architecture, different layers are defined. Each layer accomplishes operations that progressively become closer to machine instruction set. Components service user interface operations at outer layer. Components perform operating system interfacing at the inner layer.


Wednesday, October 27, 2010

Validation Phase - System Testing - Regression Testing

Regression testing is used to test or check the effect of changes that are made in the code. Most of the time the testing team is asked to check last minute changes in the code just before making a release to the client. In this situation, the testing team needs to check only the affected areas. In short, for regression testing, the testing team should get the input from the development team about the nature or amount of change in the fix so that the testing team can first check the fix and then the side effects of the fix.

Regression testing is the testing in which maximum automation can be done. The reason being the same set of test cases will be run on different builds multiple times. But, the extent of automation depends on whether the test cases will remain applicable for some amount of time, test engineers will end up in wasting time to automate with minimal results.

Regression testing is re-testing unchanged segments of application. It involves re-running tests that have been previously executed to ensure that the same results can be achieved currently as were achieved when the segment was last tested. The selective re-testing of a software system that has been modified to ensure that any bugs have been fixed and that no other previously working functions have failed as a result of newly added features have not created problems with previous versions of the software.

Regression testing is initiated after a programmer has attempted to fix a recognized problem or has added source code to a program that may have inadvertently introduced errors. It is a kind of quality control measure to ensure that the newly modified code still complies with its specified requirements and that unmodified code has not been affected by the maintenance activity.

During regression testing, following activities are performed:
- Re-running of previously conducted tests.
- Reviewing previously prepared manual procedures.
- Comparing the current test results with the previously executed test results.


Facebook activity