10. Microsoft Test Manager Test Planning Creating Test Plans Creating Test Suites Creating & Organizing Test Cases Test Execution (Manual & Scheduled) Running Manual Tests Fast Forward for Manual Tests Logging Rich Bugs
11. A Note on Developer Tester CollaborationAnd No Repro Bugs Developers are from Mars Testers are from Venus
12. Diagnostic Data Adapters Used to collect data or impact a test system Action Log and Action Recording ASP.NET Profiler Code Coverage Intellitrace Event Log System Information Test Impact Video Recorder Network Emuation Custom -> can be created
13. Test Controllers and Test Agents Run Tests Remotely on Multiple Machines Collect Data and Diagnostics Remotely
14. Visual Studio as Test Organizer All tests except Manual are stored as course code files Projects have hundreds/thousands test and keeps growing VS provides test project to create and store tests Test View Window allows test categories to group tests Test list allows Build Integration Test Results can be viewed, saved and published from Studio (TRX)
15. Demonstration Understanding Visual Studio Test Environment Organizing Visual Studio Test Environment Test Lists Window Tests View Test Results Window .vsdmi and .testsettings file Test Settings Window Test Properties
16. Automated Testing Support in Visual Studio Use following windows to run and modify properties for automated test cases Test View Test List Some Important Test Properties Test Name Test Enabled (True/False) Test Type Priority Iteration Test Categories
25. To Create a Coded UI test Perform any one of the following tasks: In Solution Explorer, right-click a test project, point to Add, and then click Coded UI Test. In the Test List Editor or the Test View window, right-click the window, and then click New Test. In the Add New Test dialog box, click Coded UI Test and then click OK. On the Test menu, click New Test. In the Add New Test dialog box, click Coded UI Test and then click OK. The Generate Code dialog box appears. From this dialog box, you can select Record actions in your application under test, modify the UI map or add assertions Record your interaction and when done Hit Generate Code and close the recorder
26. The Coded UI Test Recorder Window Shows Currently Recorded Steps Starts Recording users interaction with Desktop Generates Code for Recorded Actions Allows you to select controls and add assertions
27. The Coded UI Test Recorder Window Allows you to pause and start recording Allows you to generate code methods for currently recorded Actions or UI Objects Shows a List of Currently Recorded Steps Allows you to select controls on the user interface and add them to UI Map and Add Assertions on there properties
29. Creating Coded UI Test Tips Use the CrossHair to Locate Controls on User Interface Use Navigation button to move between parent and child controls and also peer controls You can pin the recorded steps window so that it is visible always You can delete recorded steps Make Recording Autonomous and Repeatable
34. Features of Coded UI Test Editor Use Coded UI Test Editor for To locate UI actions and controls. Remove unwanted UI actions. Changes the names for test methods and controls. View and Open Properties Window for selected item. Split one action into multiple methods. Adds custom code to your test methods by moving to UImap.cs Add a pause prior to a UI action specified in milliseconds. Identifies the location of the control in the UI of application under test. To verify control property and significant changes to the application’s controls.
36. Adding More Actions to Coded-UI Test Position Cursor where you want the new Steps to be added in CodedUI Test Method Start Recording and Hit Generate Code Button when done. New Actions are recorded as Methods and added where you had placed your cursor
39. What are assertions..? Methods that let you validate properties of your user interface elements. You typically compare the value of control properties with an expected value Expected value can be hard code or come from parameters or external files Assertions use the Unit Test assertion methods
41. Adding Assertions Right click in Coded-UI Test method and select first option “use coded UI test builder” Click on the cross hair (third button) and drag and drop on the control you want to validate Add assertions form will be shown, you can navigate through the controls and reach the top most control or form and see its properties. You can add assertion to any of the properties shown Right click on the inner text which we are interested in and click on add assertion Select comparator and comparison value and click on Ok Click on generate code button. Enter appropriate method name
43. Customizing Assertion Methods Customize the assertion methods by moving them to UIMap.cs file from UIMap.designer.cs Add Advance Features to assertions by using .NET framework related classes that help in validation
SearchUsing the top level window and technology information, playback uses the right accessibility API to locate the control. Search has lot features to be successful even if the app is going through changes. Search algorithm for Winforms is complex as many applications do not have proper accessibility support.WFRWFR stands for Wait For Ready, where actions on a control is deferred till the application is ready for user actions. In winforms there is no proper ways to know if the application is busy or not, so we only depend on foreground thread on the application to determine if it is ready for actionsEnsure VisibleThis feature will make sure the control is present in the visible area of the screen so that actions can be performed. This is accomplished in two ways, by doing setfocus on the control or scroll the window to make the control visible.UISyncOnce the action is performed UISync component will ensure that the Application Under Test (AuT) received the action. This will ensure that if playback completed successfully then one can assume that all actions completed successfully.
Show the TestMethodFile and Explain - > The TestMethod and How it is based on UnitTestsShow the Uimap.uiTest file and Show actions, objects and data as recorded in XML file
The Coded UI Test Editor toolbar offers the following commands:1 - Find helps to locate UI actions and controls.2- Delete removes unwanted UI actions.3 - Rename changes the names for test methods and controls.4 - Properties Opens the Properties Window for selected item.5 - Split into a new method lets you modularize the UI actions.6 - Move Code adds custom code to your test methods.7 - Insert Delay Before adds a pause prior to a UI action specified in milliseconds.8 - Locate the UI Control identifies the location of the control in the UI of application under test.9 - Locate All helps to verify control property and significant changes to the application’s controls.