Advertisement
Advertisement

More Related Content

Similar to Canadian Cloud Summit 2022 - SharePoint Framework Tests Introduction(20)

Advertisement

Recently uploaded(20)

Advertisement

Canadian Cloud Summit 2022 - SharePoint Framework Tests Introduction

  1. Canadian Cloud Summit
  2. Canadian Cloud Summit Sponsors
  3. Canadian Cloud Summit https://bit.ly/3uTBuGR https://www.canadiancloudsummit.com/ @CanCloudSummit SUBMIT YOUR FEEDBACK FOR A CHANCE TO WIN $50 AMAZON GIFT CARD
  4. Canadian Cloud Summit
  5. Canadian Cloud Summit • Test your code robustness • Don’t trust your developer environment (on my side, it’s working!) • Test your code and app on different environments • Do not forget tests • Avoid new bugs after fix a bug (regressions) • Test use cases that you didn't think about • Increase quality • Increase productivity • Generate reports as proof How automated tests can help you?
  6. Canadian Cloud Summit What kind of tests could be implemented? • Unit tests • Test your code JavaScript, TypeScript, React • Collect Code Coverage • End-To-End • Test your application • No code coverage • Collect a report
  7. Canadian Cloud Summit Which tools to use to perform tests? • Jest – TypeScript • Jest + Enzyme - React • TestCafé – e2e … and so other !
  8. Canadian Cloud Summit Demo Jest
  9. Canadian Cloud Summit Demo TestCafé
  10. Canadian Cloud Summit Tips and Tricks • Do not rebuild the wheel • Do not test SharePoint API • Do not include unused data in your tests • Keep it simple • Use custom data attributes for tests • Do not forget to update your tests • Keep up-to-date with the SharePoint UI constraints • Have fun
  11. Canadian Cloud Summit Sources • GitHub: https://github.com/Laul0/canadiancloudsummit22 • DevOps: https://dev.azure.com/laurentsittler/canadiancloudsummit22 • GitLab: https://gitlab.lsonline.fr/lsittler/canadiancloudsummit22
  12. Canadian Cloud Summit References • SharePoint Framework Unit Tests - TypeScript (lsonline.fr) • SharePoint Framework Unit Tests - React (lsonline.fr) • Using TestCafé for e2e testing your SPFx solutions (lsonline.fr) • Test Reporter · Actions · GitHub Marketplace • JUnit Report Action · Actions · GitHub Marketplace • Publish Unit Test Results · Actions · GitHub Marketplace • Continuous Integration | Guides | Docs (testcafe.io)
  13. Canadian Cloud Summit Sponsors
  14. Canadian Cloud Summit Q&A
Advertisement