ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
UI Automated Tests
For Dynamics
D365 UI automated tests
Cross Browser Testing
Repeatability & Consistency
D365 UI automated tests
D365 UI automated tests
D365 UI automated tests
When to Automate?
Tools?
D365 UI automated tests
D365 UI automated tests
D365 UI automated tests
D365 UI automated tests
D365 UI automated tests
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
D365 UI automated tests
D365 UI automated tests
D365 UI automated tests
D365 UI automated tests
D365 UI automated tests
D365 UI automated tests
D365 UI automated tests
D365 UI automated tests
D365 UI automated tests
D365 UI automated tests
?Activity Record Wall
?Business Process Flow
?Charts
?Commandbar
?Dashboards
?Entities (Create,
Update, Delete,
Duplicate Detection,
Assign)
?Global Search
?Guided Help
?Grids
?Sub-Grids
?Navigation
?Notifications
?Performance Center
?Quick Create
?Run Workflows
?Run Reports
D365 UI automated tests
D365 UI automated tests

More Related Content

D365 UI automated tests

Editor's Notes

  1. Introduce myself Introduce the talk, the topics What¡¯s UI and browser automated tests? What¡¯s cross browser testing? Pros and Cons of automating UI tests When to automate Available tools Introduction to Selenium, architecture description How to use selenium Example Easy Repro Introduction How to use it, Example Covered functionality Limitations of Easy Repro Desirable features in a test: Login, screenshots, Configuration How to use it with TFS
  2. What is UI Test Automation? Any program/script that simulates the User interaction (clicks, keyboard strokes, mouse scroll, touch screen gestures) What is Browser Automation? The same applied specifically to a browser
  3. When you test a web page in different combinations of browsers, OS and Devices
  4. Easily repeat steps over and over without getting bored or tired Humans sometimes skip steps, take shortcuts. Machines don¡¯t Caveat: Machines would very rarely find usability or unexpected errors.
  5. Speed. Run tests in parallel Adding a machine (on the cloud) to run your tests is far cheaper than hire someone to run them manually
  6. Write tests is costly. Every single change in the UI requires update the tests too. Increase the maintenance cost. Having a architecture or a framework that gets updated independently from your tests reduce costs. Have you ever seen a Testing Pyramid?
  7. This is not specific to Dynamics. In any development, we should emphasize the Unit tests, then the Integration tests, and last the UI. The UI should cover mostly the common happy paths. The weird errors should be tested in the lower levels of the pyramid.
  8. When to Automate? When the application is mature When we have enough time When not to automate? On Exploration tests When the UI changes frequently Tight deadlines
  9. TODO: search more tools
  10. What is Selenium? Set of tools and libraries to automate and run different browsers Every modern browser comes with an API that is programmable Problem is that every API is different Selenium is the ¡°One ring to rule them all¡± ¡°and in the darkness bind them¡± WebDriver is one of the components of Selenium Unifies browsers API elegantly Well designed
  11. Selenium also provides the same functionality available to different languages/platforms You can write your tests practically in the same way in c# or Javascript or Ruby
  12. This is another view of Selenium¡¯s Architecture
  13. How do we use selenium with visual studio and c# First, install the right nuget packages and the appropriate webdrivers
  14. Example of WebDrivers for Chrome and IE
  15. The drivers for Edge are downloaded from a separate page
  16. Overview of the code This is just a test class, as any unit test, that can be run through the command line or any other running tool. If any exceptions are thrown, the test will fail. Can use existing test features like test initializers After the test, you can Assert to check the results. If not met, than fail.
  17. Analyse code line by line 1 ¨C Create the Driver. There are specific objects for each Browser. We can use an interface instead of this and configure the browser we want to use at runtime. 2 ¨C Equivalent to typing a url in the address bar 3 ¨C Find an element in the page. If is not present, an exception is thrown 4 ¨C Perform an action on the selected element. If the action can¡¯t be performed, an exception is thrown
  18. 5 ¨C Find the button 6 ¨C perform an action on the button. Other available actions: Type, click, scroll, swipe, touch actions. Depends on the element type. Explain waits here. Before execute line 7, Selenium will detect the status of the browser and wait until it becomes completed. All the reloads, asynchronous requests are completed before moving to the next step. 7 ¨C Find another element 8 ¨C Perform an assert with the content of the element. An element not only let us perform actions on it, it also allow us to get its properties, such as text, location, values, inner elements, etc.
  19. As we¡¯ve seen Selenium is fantastic, but if we want to use it to write tests for Dynamics, it can be quite laborious (require considerable effort) What are the advantages of Dynamics 365 in terms of UI testing? All the UI elements follow the same pattern and structure. There¡¯s a perfectly defined naming convention for ui elements. All you need to know in most cases is the entity name, the attribute names and its data types. With that ,you could write very generic tests. EasyRepro is a library meant to facilitate the writing of UI tests for Dynamics 365, leveraging the well defined structure mentioned.
  20. All you need to know is the Entity Name, Attribute name and data type to know how the UI elements are going to be structured and rendered in the form
  21. Easy Repro is an Open Source project By Microsoft Built on top of selenium Still under development, but actively developed. With some limitations, but with a lot of potential
  22. The same concepts as selenium apply It all starts installing a Nuget Package
  23. CRM Online Only Issues with Edge and Firefox Not Covered Settings Area Customization Advanced Find Query Execution Export to Excel Templates Any Custom Development