Thursday, March 27, 2008
Wednesday, March 5, 2008
Debugging tips
Answering questions on the newsgroups, I've noticed that several developers seem to find debugging very difficult - not the mechanics of it, so much as knowing the right place to start. This is not to say that they are lazy or stupid - just that debugging is an art unto itself (arguably more so than writing code in the first place - it certainly involves more intuition in my view), and that a few pointers could be useful.
Making use of the techniques discussed on this page won't make you an ace bug-finder in itself - a mixture of patience, experience, intuition and good practice is needed - but my hope is that it can get you started along the right path. Note that although the page title is "Debugging", a lot of the time you may well not need to step through your code in a debugger in order to fix your code. If I'm trying to find a problem in my own code, without external dependencies such as other whole systems being involved, I usually regard it as a failure on my part if I need to use the debugger. It indicates that my code isn't clear enough and my unit tests aren't robust enough.
Making use of the techniques discussed on this page won't make you an ace bug-finder in itself - a mixture of patience, experience, intuition and good practice is needed - but my hope is that it can get you started along the right path. Note that although the page title is "Debugging", a lot of the time you may well not need to step through your code in a debugger in order to fix your code. If I'm trying to find a problem in my own code, without external dependencies such as other whole systems being involved, I usually regard it as a failure on my part if I need to use the debugger. It indicates that my code isn't clear enough and my unit tests aren't robust enough.
Tuesday, March 4, 2008
Test Case Design
Test Case ID: It is unique number given to test case in order to be identified.Test description: The description if test case you are going to test.Revision history: Each test case has to have its revision history in order to know when and by whom it is created or modified.Function to be tested: The name of function to be tested.Environment: It tells in which environment you are testing. Test Setup: Anything you need to set up outside of your application for example printers, network and so on.Test Execution: It is detailed description of every step of execution.Expected Results: The description of what you expect the function to do. Actual Results: pass / failed If pass - What actually happen when you run the test. If failed - put in description of what you've observed.
Test Case Design Techniques:
Black box techniques: Boundary value analysis, Equivalence partitioning. White box testing techniques are Branch Testing, Condition Testing.
Equivalence Partitioning:
Is the process of taking all of the possible test values and planning them into classes (groups). Test cases should be designed to test one value from each group. So that it uses fewest test cases to cover maximum input requirements.
Boundary Value Analysis:This is a selection technique where the test data lie along the boundaries of the input domain.
Branch Testing:
In branch testing, test cases are designed to exercise control flow braches or decision points in a unit.
Characteristics of a Good Test: They are: likely to catch bugs, no redundant , not too simple or too complex. Test case is going to be complex if you have more than one expected results.
Test Case Design Techniques:
Black box techniques: Boundary value analysis, Equivalence partitioning. White box testing techniques are Branch Testing, Condition Testing.
Equivalence Partitioning:
Is the process of taking all of the possible test values and planning them into classes (groups). Test cases should be designed to test one value from each group. So that it uses fewest test cases to cover maximum input requirements.
Boundary Value Analysis:This is a selection technique where the test data lie along the boundaries of the input domain.
Branch Testing:
In branch testing, test cases are designed to exercise control flow braches or decision points in a unit.
Characteristics of a Good Test: They are: likely to catch bugs, no redundant , not too simple or too complex. Test case is going to be complex if you have more than one expected results.
Shortchu Key Used in IE7
Keyboard shortcuts
Open links in a new tab in the background CTRL+click
Open links in a new tab in the foreground CTRL+SHIFT+click
Open a new tab in the foreground CTRL+T
Open a new tab from the Address bar ALT+ENTER
Open a new tab from the search box ALT+ENTER
Open Quick Tabs (thumbnail view) CTRL+Q
Switch between tabs CTRL+TAB/CTRL+SHIFT+TAB
Switch to a specific tab number CTRL+n (n can be 1-8)
Switch to the last tab CTRL+9
Close current tab CTRL+W
Close all tabs ALT+F4
Close other tabs CTRL+ALT+F4
Mouse shortcuts
Open a link in a background tab Click the middle mouse button on a link
Open a new tab Double-click the empty space to the right of the last tab Close a tab Click the middle mouse button on the tab
Open links in a new tab in the background CTRL+click
Open links in a new tab in the foreground CTRL+SHIFT+click
Open a new tab in the foreground CTRL+T
Open a new tab from the Address bar ALT+ENTER
Open a new tab from the search box ALT+ENTER
Open Quick Tabs (thumbnail view) CTRL+Q
Switch between tabs CTRL+TAB/CTRL+SHIFT+TAB
Switch to a specific tab number CTRL+n (n can be 1-8)
Switch to the last tab CTRL+9
Close current tab CTRL+W
Close all tabs ALT+F4
Close other tabs CTRL+ALT+F4
Mouse shortcuts
Open a link in a background tab Click the middle mouse button on a link
Open a new tab Double-click the empty space to the right of the last tab Close a tab Click the middle mouse button on the tab
Subscribe to:
Posts (Atom)