Subscribe by Email


Showing posts with label Debugging. Show all posts
Showing posts with label Debugging. Show all posts

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()





Wednesday, January 16, 2013

What kinds of functions are used by Cleanroom Software Engineering approach?


Harlan Mills and his colleagues namely Linger, Poore, Dyer in the year of 1980 developed a software process that could promise building zero error software at IBM. This process is now popularly known as the Cleanroom software engineering. The process was named in accordance with an analogy with the manufacturing process of the semiconductors. 

The Clean room software engineering process makes use of the statistical process and its control features. The software systems and applications thus produced have certified software reliability. The productivity is also increased as the software has no defects at delivery. 
Below mentioned are some key features of the Cleanroom software engineering process:
  1. Usage scenarios
  2. Incremental development
  3. Incremental release
  4. Statistical modeling
  5. Separate development
  6. Acceptance testing
  7. No unit testing
  8. No debugging
  9. Formal reviews with verification conditions
Basic technologies used by the CSE approach are:
  1. Incremental development
  2. Box structured specifications
  3. Statistical usage testing
  4. Function theoretic verification
- The incremental development phase of the CSE involves overlapping of the incremental development and from beginning of specification to the end of the test execution it takes around 12 – 18 weeks.
- Partitioning of the increments is critical as well as difficult. 
Formal specification of the CSE process involves the following:
  1. Box structured Designing: Three types of boxes are identified namely black box, state box and clear box.
  2. Verification properties of the structures and
  3. Program functions: These are one kind of functions that are used by the clean room approach.
- State boxes are the description of the state of the system in terms of data structures such as sequences, sets, lists, records, relations and maps. 
- Further, they include specification of operations and state in-variants.
- Each and every operation that is carried out needs to take care of the invariant. 
- The syntax errors present in a constructed program in clean-room are checked by a parser but is not run by the developer.
- A team review is responsible for performing verification which is driven by a number of verification conditions. 
- Productivity is increased by 3–5 times in the verification process as compared to the debugging process. 
- Proving the program is always an option with the developers but it calls for a lot of math intensive work.
- As an alternate to this, clean room software engineering approach prefers to use a team code inspection in terms of two things namely:
  1. Program functions and
  2. Verification conditions
- After this, an informal review is carried out which confirms whether all conditions have been satisfied or not. 
- Program functions are nothing but functions describing the prime program’s function.

- Functional verification steps are:
1.    Specifying the program by post and pre-conditions.
2.    Parsing the program in to prime numbers.
3.    Determining the program functions for SESE’s.
4.    Defining verification conditions.
5.    Inspection of all the verification conditions.
- Program functions also define the conditions under which a program can be executed legally. Such program functions are called pre-conditions.
- Program functions can even express the effect the program execution is having up on the state of the system. Such program functions are called the post conditions.
- Programs are mostly expressed on terms of the input arguments, instance variables and return values of the program. 
- However, they cannot be expressed by local program variables. 
- The concept of nested blocks is supported by a number of modern programming languages and structured programs always require well nesting. 
- The process determining SESE’s also involves parsing rather than just program functions.


Wednesday, December 26, 2012

What is IBM Rational Purify?


Rational Purify is another dynamic tool from IBM which is meant for carrying out the analysis of the software systems and applications and to provide help to the software developers in producing a code that is more reliable. 

The IBM rational purify comes with unique capabilities:
  1. Memory leak detection: This capability is related to the identification of the memory blocks to which there are no valid pointers.
  2. Memory debugging: This capability is related to pin – pointing memory errors which are quite hard to be discovered such as the following:
a)   Points in code where the memory is freed improperly,
b)   Buffer over flow
c)   Access to uninitialized memory and so on.
  1. Performance profiling: This capability is involved with highlighting the bottle necks of the program performance and improving the application understanding via some graphical representations of the calls to the functions.
  2. Code coverage: This capability involves the identification of the code with the line – level precision that is untested.
- Platforms such as the AIX, solaris, windows, Linux and so on support the IBM rational purify. 
- The code that is developed with the help of the IBM rational purify is not only reliable but also faster. 
- This analysis tool is very well supported by the windows application development environment. 
- It has been observed that the windows applications which have been developed using the rational purify have stood to be quite reliable throughout. - There is no need to provide rational purify with a direct access to the source code.
- This makes it capable to be used with the libraries belonging to the third–parties. 
- Languages such as the .NET, visual C++ etc are supported by the rational purify. 
- The IBM rational purify is known to integrate well with the Microsoft visual studio. 
- Almost all the software systems belonging to the windows family are supported by the IBM rational purify. 
- The corruption in the memory is identified and the debugging time is reduced significantly. 
- The reliability pertaining to the execution of the software is also reduced. 
- Also, the software systems and applications now make a better utilization of the memory. 
- The IBM rational purify comes with the binary instrumentation technology in which the code is instrumented at the level of the object or the byte level. 
Here, re–linking or the re–compilation of the software system or application is not required for the analyzation of the code. 
- Further, the third–part libraries are also analyzed. 
- With the help of the IDE integration feature, the rational purify can integrate very well with the Microsoft visual studio thus cutting down on the need of switching between different tools having different types of user interfaces. 
- It therefore develops a more productive and cohesive development environment and experience. 
- It helps in the testing as well as the analyzation of the code as it is produced by the programmer. 
- A comprehensive support is provided to most of the programming languages. - The ‘selective instrumentation’ feature of the rational purify enables a user to limit the analyzation of the software to a subset consisting of the modules which together comprise the whole application. 
- This helps greatly in the reduction of the run-time and instrumentation overhead.  
- The reporting to the modules concerned also gets limited. 
- The rational purify can be run from the command line also since it comes with a command line interface. 
- Automated testing frame works are among the rest that are supported by the software system or application. 
- In a way the software developers are empowered in delivering the product with the quality that is expected by the users.


Friday, October 12, 2012

What are main features of Silk test?


The Borland silk test automation tool is said to possess all the features and qualities that an ideal testing tool is said to have. Therefore, in this article we shall focus on the features of the Borland silk test automation tool.

  1. It is quite easy for use since it is possible for the business users to create the automated tests without requiring any actual software coding.
  2. Further the silk test automation tool takes lesser time for its deployment i.e., it can be deployed fast which in turn enables the software testers to keep an appropriate pace with the rate with which the development takes place.
  3. It's third most important feature is its flexibility while use which in turn enables the software developers to create tests in an integrated development environment that is chosen by them only.
  4. The fourth feature of the silk test is that it provides the role based test automation. Usually it happens that the domain experts, business analyst, developer or automation engineer – all of these people have their own way of working i.e., they have a tendency to work with different interfaces such as some may work with a visual interface, others with script based or some others with interfaces that are IDE powered. The silk test automation tool provides each of them with a suitable interface with which they are comfortable. Thus, in a way a kind of empowerment is granted to the users so that they can participate in the testing process with confidence and ensure that their critical applications go through a continuous validation.
  5. Fifth most popular feature is the cross browser web testing by silk test. Most advance web 2.0 applications can be verified for their functionality very well before you are able to launch them with confidence. Using silk test automation tool, one powerful script can be used for carrying out testing in  a number of different  browsers as well as browser versions as well as in locales such as the following:
a)     Microsoft internet explorer
b)     Mozilla firefox
c)     Google chrome
d)     Html 5
e)     Fx
f)      Ajax
g)     Microsoft silverlight
h)     Java and so on.
Even the embedded technologies can tested very well at speeds that are non -parallel with that of the any other software test automation tool.
  1. Sixth feature is the support for the .net and java platform and scripting language. With silk test, it really does not matters now that whether you go for vb. Net, C#, java which are industry standard languages or you go for 4test language of the silk test. Using any of these you can improve the working of the silk test in whichever environment you are working up on. Both visual studio as well as the eclipse is supported by the silk test and it takes care that they can be well integrated with the acceptance tests and unit tests frame works such as fitness e.
  2. Seventh feature of the silk test is its powerful recorder. The powerful recorder of the silk test has got many powerful features which enable the quick capturing of the reusable as well as the common sequences of the test steps. There is also a provision of the easy modification and customization of the sequences so that they can be reused in the test automation frame works.
  3. The eighth feature is the debugging feature of the silk test. The debugging feature of the silk test consists of some powerful debugging capabilities which enable one to step through the automation sequence and check out what is actually happening there. 


Friday, October 5, 2012

Explain the QTP Tool interface?


The tool interface of the quick test professional is the focus of this article. The tool interface of the quick test professional consists of certain elements:
  1. Title bar: This bar displays or holds the name of the test that is currently open.
  2. Menu bar: This bar holds all the quick test commands that one may need often.
  3. File tool bar: This bar holds all the quick test commands or tools that one may need in the management of the tests.
  4. Test tool bar: This bar holds all the quick test commands or tools that may are required in the creation as well as management of the tests.
  5. Debug tool bar: This bar holds all the quick test commands that may be required while debugging of the tests. Usually this bar is not displayed along with the other bars when the quick test professional is launched. If the quick test professional is not displaying the debug bar by default then you need to go to the view and select debug tool bar from the tool bars sub list.
  6. Status bar: This bar displays the current status of the test that is currently under execution.
  7. Action tool bar: This bar holds a list of actions using which one can view the individual details of the whole test flow or an individual test or action. Just like the debug tool bar this tool bar is also not displayed by the quick test professional by default. For displaying it along with the other bars you need to go to the view menu and select action tool bar from the sub list of the tool bars. But if you have inserted an external action or a reusable action in to your test scripts, then the quick test professional displays the action tool bar automatically.
  8. Test pane: This pane consists of two tabs which enable the viewing of the test in two view modes namely: the expert view and the key word view or the tree view.
  9. Test details pane: This pane holds the active screen of the quick test professional.
  10. Data table: This table consists of two tabs namely: the action tab and the global tab. Both of these tabs together provide you assistance during the parameterization of your tests.
  11. Debug viewer pane: This pane consists of three tabs namely, the expressions, the commands and the variables. All of these 3 tabs provide you assistance while you debug your tests. However, there is one issue with debug viewer pane which is that you can open it only when you pause the test run at a break point.
As we know that the quick test professional provides two standard views as well way to modify the test scripts namely:
  1. Key word view and
  2. The expert view
- It is because of these views that the quick test professional is said to possess an IDE or integrated development environment. 
- The quick test professional comes with several standard IDE features like break points etc.
- The scripting language that is used by the quick test professional i.e., the VBScript provides support for the classes but not for the other aspects of object oriented programming like inheritance, polymorphism etc. 
- It lacks some other features such as:
  1. Cannot use some visual basic key words.
  2. Does not have an integrated debugger.
  3. No event handler
  4. No forms editor
- The debugger has got a limited functionality when compared with the debuggers of java, VBA, VB.NET and so on. 


Sunday, September 23, 2012

What is keyword view and Expert view in QTP?


In quick test professional you get two types of views namely the key word view and the expert view which we are going to discuss in this article. 

Keyword View in Quick Test Professional

- The key word view is more like a table like view which consists of a finite number of rows and columns. 
- Each row in the key word view represents a separate step. 
-On the other side, different parts of the steps are marked by the corresponding columns. 
- There is a separate column called the item column which holds the item on which the user wants the step to be carried out. 
- Also, in this column the hierarchy of the GUI object on which the operations are to be carried out. 
- There is another column by the name operation column consisting of the operations to be performed on the item as required. 
- One more column called value column holds the values of the arguments for the operation selected by the user. 
- Each step is documented by the quick test professional under the column titled documentation by the quick test professional for the ease of understanding. 
- The above mentioned 4 columns are the default columns provided by the quick test professional however comment and assignment columns in key word view can be used. 
With the aid of key word view you can create as well as view the steps of the operation in a tabular, modular and key word driven format. 
- Full access is granted to the test automation experts via some debugging environment and integrated scripting that has round trip synchronizing with the key word view. 

Expert View and Differences between expert and keyword view in Quick Test Professional

- The expert view also displays the same object hierarchy all mapped to the same arguments value and same operation. 
- The basic difference lies between the formats in which the same data is arranged in the two. 
- Both have a distinct way of representing the data though the data displayed is same. 
- All the operations like creation of a step, modifying it and so on can be carried out in the key word view. 
- Expert view as the name suggests is a more advanced way of dealing with the data and requires mastery over the tool. 
- After all of the operations are recorded, they are displayed as steps in the quick test professional in key word view whereas these steps are generated as scripts in the expert view. 
- Expert view is for the advanced testers, using which they can view as well as edit their tests as and when required. 
- This also reveals the underlying standard of the VBscript that is used by the quick test professional. 
- Any changes that are made to the scripts in the expert view are automatically reflected in the key word view also.  
- However, in key word view the exact recording of the applications can be viewed. 
- In key word view, the steps can be created as well as viewed and can be modified by making a selection of the operations as well as items in the key word view and putting in the information as and where required. 
- In the expert view each of the operations that are performed in the form of VB script statements are displayed. 
- There exists a row in the key word view for every method and object. 
- To put it simply, it can be said that the VBscript format is used by the expert view whereas the scripts are represented using graphical user interface which is divided in to 4 default columns as mentioned earlier in the article in key word view. 
- Also, in the expert view all the test statements are displayed.  


Tuesday, August 28, 2012

What are all the default codes WinRunner generates when you start an application?


Automation might be quite a headache but it helps in decreasing the execution time by a great margin and in a way it saves a large number of precious man hours. Once you are done with the default installation of the winrunner you will observe that a winrunner directory has been created under programs. 
This folder consists of the following:
  1. Winrunner executable
  2. Uninstall winrunner
  3. Soft key configuration
  4. Read me
  5. Fonts expert
  6. Sample application folder and
  7. Documentation folder etc.
The purpose of the winrunner is that it has been designed for performing functional testing and regression testing. Take a moment to study some sample application saved in the folder “sample application”. Now let us take a look at the winrunner application! 
- A tool bar is there which contains options such as new, open, save and list box for run modes namely:
  1. Verify
  2. Debug and
  3. Update
- Plus a red button for recording purpose, green arrow for running the test scripts from line 1 and a purple line pointer for running scripts from the current line. 
- Apart from this there are start, stop and pause buttons. 
- Rest of the options on this tool bar are for debugging purpose.  

Now let us begin with the recording of a simple script! 
- You open the application software and winrunner as well. 
- Re-size both the windows such that both of them are visible to you and they do not overlap. 
- Start recording by clicking on the record button and perform some specific operations (like entering some user id and password of the start up page is login page) on the start up screen of the application. 
- After performing some 3-4 operations click on the stop button of the winrunner application and the recording will be stopped. 
- After this, the scripts can be played back and if you might have observed there is a code that the winrunner might have developed for you. 
- Now, after saving the script take a look at the code which some what looks like this:
        #startup window
        Set_window(“login”,3);
        Edit_set(“user id”,”active);
        Password_edit_set(“password”,”*****”);
        Button_press(“sign in”);
        And the code continues.

- Like the above code, the default codes are generated by the winrunner up on the start up of an application software.
- The symbol “#” marks the comments in winrunner. 
- The code may or may not contain a couple of comments. 
- The comments are inserted by the winrunner during the recording phase itself. 
- The second arguments or the numbers in the code represent the time lag between any two statements while the scripts are being recorded.
- Whenever a script is saved through winrunner, a folder by either a default name or name given by the user as the case may be is created which consists of a file by the name “script”. 
- This file consists of the default generated code in plain ASCII codes. 
- This code can be run in two modes namely the verify mode and the debug mode. 
- After this phase, comes the development mode in which the debug mode is used. 
- Finally, the verify mode is used. 
- The set_window() statement in the code lays down the focus on the window. - This helps in performing a particular function on a specific window. 
- When you type in the user id, it is identified by the winrunner and the edit_set statement is generated accordingly. 
- The next statement i.e., the  password_edit_set statement is similar to the edit_set statement, the only difference being that this field contains encrypted data and for security reasons is to be displayed as a series of asterisk “*” marks. 


Tuesday, August 21, 2012

When do you use Break Points? What is Toggle Break Points? How it differ from Break points?


What you got to do when you are in need of pausing a test run in between its execution? 
- Break points are used to mark such points in the test script where you want the test to be paused. 
- Break points have proved to be a very useful tool in the discovery of the flaws that might be present in a test script. 
- A break point marker marks the break point present in the test script. 
- This break point marker resides in the left margin of the test scripts.
- The test run is paused by the winrunner whenever it encounters a break point. 
- On a particular break point following tasks can be carried out:
  1. The effects of the test run can be examined.
  2. The current value of the variables can be viewed.
  3. Any necessary changes can be made.
  4. Test can be continued to further execution.

How to use Break Points?

- To continue the execution of the test after completing the task to be carried out on the break point the “run from arrow” command can be given and the test will restart from the break point. 
- Once, it gets in to the execution process again it will continue to execute until and unless it encounters another break point or till the test is complete. 
- One thing that should always be taken care of is to make sure that the winrunner is out of batch mode otherwise it won’t pause. 
- For winrunner to pause on break points, it is mandatory that it comes out of the batch mode. 
- If it is not, it is sure to ignore the break points. 
- There are 3 main uses of the break points:
  1. They are used to suspend the test run at a particular point so that the state of your software system or application can be inspected.
  2. They are used for monitoring the entries that are there in the watch list.
  3. They are used to mark certain points throughout the test script for the stepping purpose by using the step commands.

Types of Break Points

We have two types of break points as mentioned below:
  1. Break at location point: This break point makes the test to stop at some line number specified by the user in a test script and
  2. Break in function point: This break point makes the test to stop whenever a functioned specified by the user is called in a loaded compiled module.
The break points that you define in a session remain active for that particular winrunner session only. Once you terminate that particular winrunner then you must redefine the break points to continue the debugging of the test script in the successive session.

Toggle Break Point and how they differ from normal break point

- Toggle break point command is used whenever you have to set a break at the location break point. 
- For doing this, you just need to move the point of insertion to that line of the test script where according to your desire the test must stop executing. 
- Now go to the debug menu and click on the option “toggle break point” or you can simply go for the button entitled toggle break point. 
- Once you have clicked on this you can observe a symbol of break point towards the left margin of the current window of the winrunner. 
- This break like other break points is also listed in the break points list.
- There is just one simple difference which is that the toggle break points automatically make use of the pass count of 0 and if some other pass count is required these break points can be easily modified. 


Sunday, August 19, 2012

What are different types of running a test in WinRunner?


After you are done with the creation of the test scripts for your cases, you subject them to be compiled by the winrunner which in turn interprets these test scripts line by line. Ultimately, the tests are executed as though they were being run by a real world human user. 

In this article we are going to discuss about different types of running a test in winrunner. 

1. Running a test to check the software system or application:  
This type of test run involves a rigorous check of the behavior of the software   system or application as well as a sincere comparison among the current results and the expected results. The folder where you want the verification results to be saved can be specified by you itself. Following steps are followed for this type of test run:
a)   For opening your test hog down to open option in the file menu and click it to open a test.
b)   But be first make it sure that you have set the run mode to verify run mode on the test tool bar.
c)   Now choose an appropriate test menu command or you simply click on one of the run options. When you do this a run test dialogue box appears.
d)   It is your wish if you want to save your test results with a default test run name.
e)   The winrunner saves the test results.

    2. Running a test for debugging a test script: 
   Whenever you have to debug the test scripts a similar type of comparison is carried out by the winrunner as in the previous type between the current response and the expected response. After debugging only one set of debug results is saved in the debug results folder. So whenever you carry out a second execution of the same test, the results are over written by the winrunner. Following steps can be carried out for this type of test run:
    a)   Follow the same step a in the previous test run type to open a test.
    b)   Then go for the debug option from the list of run modes on the test tool bar.
    c)   Then you go for the run or debug menu command that you want.
    d)   For executing the entire test go for the “run from top” option available in the test menu.

    3. Running a test for updating the expected result: 
    This type of test run helps one in updating the expected results. In this case, the expected results that were created earlier are replaced by the new results and these new results in turn become the subject of comparison for the subsequent test results to come. For running a test for updating the expected results follow the first step as given in the previous two cases for opening a test. Go to the list of run modes from the test tool bar and select the update option. Then choose an appropriate test menu command from the list. For updating the entire set go for the option “run from top” in the test tool bar or simply click on the “from top” button on the tool bar.

    4. Running a test for checking the date operations: 
   Once a test has been created that checks date operations, it is run to check in what way the software system or application responds to the date information present in the test. You must make sure that in the general category of the options dialogue box the option “enable date operations” must have been selected. 


Facebook activity