Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Coded ui test

14,580 views

Published on

  • My personal experience with research paper writing services was highly positive. I sent a request to ⇒ www.HelpWriting.net ⇐ and found a writer within a few minutes. Because I had to move house and I literally didn’t have any time to sit on a computer for many hours every evening. Thankfully, the writer I chose followed my instructions to the letter. I know we can all write essays ourselves. For those in the same situation I was in, I recommend ⇒ www.HelpWriting.net ⇐.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Hi there! I just wanted to share a list of sites that helped me a lot during my studies: .................................................................................................................................... www.EssayWrite.best - Write an essay .................................................................................................................................... www.LitReview.xyz - Summary of books .................................................................................................................................... www.Coursework.best - Online coursework .................................................................................................................................... www.Dissertations.me - proquest dissertations .................................................................................................................................... www.ReMovie.club - Movies reviews .................................................................................................................................... www.WebSlides.vip - Best powerpoint presentations .................................................................................................................................... www.WritePaper.info - Write a research paper .................................................................................................................................... www.EddyHelp.com - Homework help online .................................................................................................................................... www.MyResumeHelp.net - Professional resume writing service .................................................................................................................................. www.HelpWriting.net - Help with writing any papers ......................................................................................................................................... Save so as not to lose
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • D0WNL0AD FULL ▶ ▶ ▶ ▶ http://1lite.top/C1LMm ◀ ◀ ◀ ◀
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Coded ui test

  1. 1. Overview of testing features of Visual studio<br />Module 1<br />iMentor Knowledge Services<br />
  2. 2. Testing Effort Requirements<br /><ul><li>Tests should be
  3. 3. Comprehensive, Fast, Accurate, Consistent, Responsive to changes in development process
  4. 4. Tests Must Cover
  5. 5. User Interface, Business Logic, Database Components
  6. 6. Test Results
  7. 7. Captured in consistent mechanism, Traceable, Automated (for repetitive)</li></li></ul><li>Microsoft’s Answer<br />Automated Test Capabilities<br />Manual Testing<br />Lab Management<br />
  8. 8. Tester Segmentation<br />Generalist Tester<br />Specialist Tester<br />Manual Testing<br />Some Scripts<br />Creates Batch Files to set up lab, create data<br />Strong Scripting Skills<br />Some Coding Skills<br />Strong Coding Skills<br />Develops fully automated testing procedures<br />Expert coding skills<br />Blank Box Testing<br />White box testing<br />API testing<br />
  9. 9. Visual Studio 2010 Testing Stack<br />
  10. 10. Microsoft Test Manager<br />Test Planning<br />Creating Test Plans<br />Creating Test Suites<br />Creating & Organizing Test Cases<br />Test Execution (Manual & Scheduled)<br />Running Manual Tests<br />Fast Forward for Manual Tests<br />Logging Rich Bugs<br />
  11. 11. A Note on Developer Tester CollaborationAnd No Repro Bugs<br />Developers are from Mars<br />Testers are from Venus<br />
  12. 12. Diagnostic Data Adapters<br />Used to collect data or impact a test system<br />Action Log and Action Recording<br />ASP.NET Profiler<br />Code Coverage<br />Intellitrace<br />Event Log<br />System Information<br />Test Impact<br />Video Recorder<br />Network Emuation<br />Custom -> can be created <br />
  13. 13. Test Controllers and Test Agents<br />Run Tests Remotely on Multiple Machines<br />Collect Data and Diagnostics Remotely<br />
  14. 14. Visual Studio as Test Organizer<br />All tests except Manual are stored as course code files<br />Projects have hundreds/thousands test and keeps growing<br />VS provides test project to create and store tests<br />Test View Window allows test categories to group tests<br />Test list allows Build Integration<br />Test Results can be viewed, saved and published from Studio (TRX) <br />
  15. 15. Demonstration<br />Understanding Visual Studio Test Environment<br />Organizing Visual Studio Test Environment<br />Test Lists Window<br />Tests View<br />Test Results Window<br />.vsdmi and .testsettings file<br />Test Settings Window<br />Test Properties<br />
  16. 16. Automated Testing Support in Visual Studio <br />Use following windows to run and modify properties for automated test cases<br />Test View<br />Test List<br />Some Important Test Properties<br />Test Name<br />Test Enabled (True/False)<br />Test Type<br />Priority<br />Iteration<br />Test Categories<br />
  17. 17. Overview of Coded UI Test<br />
  18. 18. Understanding Resilient Playback of Coded UI Tests<br />
  19. 19. Platform Support for Coded UI Tests<br />
  20. 20. Creating a coded ui test<br />Module 2<br />iMentor Knowledge Services<br />
  21. 21. Creation of Coded UI Tests<br /><ul><li>A Coded UI Test can be created using Following ways
  22. 22. Generating from an Existing Action Recording ( Converting from manual test recording)
  23. 23. Creating a New Coded-UI Test From Scratch
  24. 24. Writing Code From Scratch(Advanced Option )</li></li></ul><li>To generate a Coded-UI test from action recording<br />Open Visual Studio.<br />Select Test, New Test from the main menu.<br />In the Add New Test dialog, select Coded UI Test<br />When the New Test Project dialog displays, enter a name for test project and click create<br />In the Generate Code for Coded UI Test dialog, select Use an Existing Action Recording, and click OK.<br />Search for the Test Case you want to automate in the Work Items Picker dialog, and click OK.<br />
  25. 25. To Create a Coded UI test<br />Perform any one of the following tasks:<br />In Solution Explorer, right-click a test project, point to Add, and then click Coded UI Test.<br />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.<br />On the Test menu, click New Test. In the Add New Test dialog box, click Coded UI Test and then click OK.<br />The Generate Code dialog box appears.<br />From this dialog box, you can select<br />Record actions in your application under test, modify the UI map or add assertions<br />Record your interaction and when done Hit Generate Code and close the recorder<br />
  26. 26. The Coded UI Test Recorder Window<br />Shows Currently Recorded Steps<br />Starts Recording users interaction with Desktop<br />Generates Code for Recorded Actions<br />Allows you to select controls and add assertions<br />
  27. 27. The Coded UI Test Recorder Window<br />Allows you to pause and start recording<br />Allows you to generate code methods for currently recorded Actions or UI Objects<br />Shows a List of Currently Recorded Steps<br />Allows you to select controls on the user interface and add them to UI Map and Add Assertions on there properties<br />
  28. 28. Demonstration<br />Creating Automated Test from manual test<br />Creating Automated Test By Recording<br />Exploring Generated Code<br />
  29. 29. Creating Coded UI Test Tips<br />Use the CrossHair to Locate Controls on User Interface<br />Use Navigation button to move between parent and child controls and also peer controls<br />You can pin the recorded steps window so that it is visible always<br />You can delete recorded steps<br />Make Recording Autonomous and Repeatable<br />
  30. 30. Reach nested controls using Coded UI Test Builder<br />
  31. 31. Generated Code Files<br />
  32. 32. Generated Code - Classes<br />
  33. 33. Coded UI Test Editor<br />
  34. 34. Features of Coded UI Test Editor<br />Use Coded UI Test Editor for<br />To locate UI actions and controls.<br />Remove unwanted UI actions.<br />Changes the names for test methods and controls.<br />View and Open Properties Window for selected item.<br />Split one action into multiple methods.<br />Adds custom code to your test methods by moving to UImap.cs<br />Add a pause prior to a UI action specified in milliseconds.<br />Identifies the location of the control in the UI of application under test.<br />To verify control property and significant changes to the application’s controls.<br />
  35. 35. Demonstration – Using Coded UI Test Editor<br />
  36. 36. Adding More Actions to Coded-UI Test<br />Position Cursor where you want the new Steps to be added in CodedUI Test Method<br />Start Recording and Hit Generate Code Button when done. <br />New Actions are recorded as Methods and added where you had placed your cursor<br />
  37. 37. Demonstration<br />Adding more actions to an already recorded Coded-UI Test Method<br />
  38. 38. Adding and using Assertions<br />Module 3<br />iMentor Knowledge Services<br />
  39. 39. What are assertions..?<br />Methods that let you validate properties of your user interface elements.<br />You typically compare the value of control properties with an expected value<br />Expected value can be hard code or come from parameters or external files<br />Assertions use the Unit Test assertion methods <br />
  40. 40. Adding Assertions using Coded-UI Test Builder<br />
  41. 41. Adding Assertions<br />Right click in Coded-UI Test method and select first option “use coded UI test builder”<br />Click on the cross hair (third button) and drag and drop on the control you want to validate<br />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 <br />Right click on the inner text which we are interested in and click on add assertion <br />Select comparator and comparison value and click on Ok <br />Click on generate code button. Enter appropriate method name<br />
  42. 42. Demonstration<br />Adding Assertions to Coded-UI Test<br />Understanding Assertion Methods<br />
  43. 43. Customizing Assertion Methods<br />Customize the assertion methods by moving them to UIMap.cs file from UIMap.designer.cs<br />Add Advance Features to assertions by using .NET framework related classes that help in validation<br />
  44. 44. Demonstration<br />Customizing Assertion Methods<br />Advanced Assertion Methods<br />
  45. 45. Adding un-used controls to UI Map<br />Add Control to UI Map without recording or Asserting<br />
  46. 46. Demonstration<br />Add Control to UI Map without recording or Asserting<br />

×