Skip to content

Instantly share code, notes, and snippets.

@Kartikeya99
Last active August 27, 2019 10:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kartikeya99/5556466af0054c1db26b4e64854d920a to your computer and use it in GitHub Desktop.
Save Kartikeya99/5556466af0054c1db26b4e64854d920a to your computer and use it in GitHub Desktop.
This gist documents all the work done and my experiences under the Google Summer of Code programme in 2019.

Refactor UI tests Helper codeceptjs-resemblehelper

About codeceptjs-resemblehelper and Percona Monitoring and Management

codeceptjs-resemblehelper is a CodeceptJS helper which integrates the resemble.js functionality of image comparison in tests used to compare images/screenshots and pass/fail tests based on the tolerance level provided. Percona Monitoring and Management is Percona’s open source database software and tool for managing and monitoring MySQL®, MariaDB®, MongoDB®, PostgreSQL, AWS and other open source database performance

About the project

As per my GSoC project, I had to make bug fixes, add stability, add new features and develop the new version of the codeceptjs-resemblehelper plugin and then use this plugin to test the new and upcoming version-2 of the Percona Monitoring Management. After contributing to the plugin, I used it to modify the current tests, make bug fixes and implement features and cover new dashboards and workbenches with tests for the Percona Monitoring and Management(PMM). The source code for the Percona Monitoring and Management can be found here.

Mentors

Commits

  1. Added screenshotElement function. 3dd89ee
    • This method locates the element mentioned, takes a screenshot, clips it to the dimensions and then saves it to the mentioned output folder. Works with puppeteer as well as webdriverio.
  2. Added check for puppeteer helper. 95b4591
    • This method checks if the test suite is running on the puppeteer driver which enables the addition of various dependent functionality.
  3. Made in sync with master. feac510
  4. Updated Readme. cebb963
    • Updated the documentation to incorporate the instructions and usage of the screenshotElement method.
  5. Added allure reporter functionality. 7173ede
    • By using this, the tests will automatically be displayed in the report generated by the allure reporter and it will include the screenshots taken and all the information regarding whether a given test passed or failed.
  6. Functions for cloud support for Google Drive. 2d657c1
    • Change in the package.json to add the googleapis dependency to use it for cloud support.
  7. Cloud Support for AWS 4093f71
    • Change in the package.json to add the aws-sdk dependency to use it for cloud support.
  8. Documentation for cloud support methods b801215.
    • Adds documentation and instruction regarding usage of the cloud support of methods.
  9. Fixed Download file error and updated README 8ae55d8
  10. Added auto upload/download when AWS added b616008
    • Updated the functions for cloud support and README.
  11. delete package-lock.json cb9fb5d
  12. Resolving conflicts for branch cloudSupport. efefbf3
  13. Resolving conflicts for branch reporter. 5721a69
  14. Support for ignoredBox. a9a36c6
    • Adds functionality to provide a region of the image where the pixels are not supposed to be taken into account while comparing.
  15. Debug shows path to diff image. 06233f7
    • the --debug flag will also show the path to the diff image if generated.
  16. Fixed bug when dimensions aren't same 33ec041
    • This contribution raises an error when the images used for comparison dont have the same dimensions. This is due to the fact that the tool gives unpredictable results when the dimensions are not same.
  17. Made compliant with PMM2. be7971a
    • Updated all the dependencies to use their latest versions.
    • Made necessary changes for the code to work with new changes.
  18. Added sauce helper back to config and PMM URL. c55d447
  19. Resolving conflicts. 2dc7a0c, 394eea2
  20. Added tests for QAN. e529381
    • Added tests for the QAN Dashboard on the PMM Webiste.
  21. Added more metrics to test for. c88cb3d
    • Added extra metrics to test for under various dashboards.
  22. Extra Metrics and ProxySQL Tests. 0a58f62
    • Added extra metrics to test for under various dashboards and added tests for the ProxySQL Dashboard on the PMM Website
  23. Added tests in Insights Folder. 0832503
    • Added tests for various dashboards under the Insight Folder on the PMM Website.
  24. Added PXC Galera Cluster Overview Dashboard test. 056a4bf
    • Added tests for various metrics on the PXC Galera Cluster Overview Dashboard.
  25. Added mongodb cluster summary test. cd3f18c
    • Added tests for various metrics on the mongoDB cluster summary dashboard.
  26. Resolving merge conflicts. 231d019
  27. Grouped Insights Folder Tests. e9a6d07
    • Grouped all the tests in the insights folder under different scenarios to reduce test time and complexity.
  28. Resolving conflicts. f436442
  29. PostgreSQL Services Overview Dashboard Test. 660601f
    • Added tests for the PostgreSQL Services Overview Dashboard.
  30. Verifying Service Names in QAN and inventory. 74f31f2
    • There is an inventory page which lists all the nodes under monitoring and on the QAN page, all the metrics regarding those nodes are shown. Wrote a test to make sure all the nodes in the inventory are listed on the QAN Page.
  31. Verifying various dashboards in MySQL Overview. ee046cd
    • Added tests for multiple nodes listed under the MySQL overview dashboard.

Experiences

My favorite part of participating in GSoC is the exposure I got of working for an organization that's pushing toward its goals and I'm being helpful to them in whatever way possible. I got to learn a lot from my mentor and my organization, things both on the technical and the personal sides, most important of them being properly managing my time so that I don't lag behind in my timelines and start affecting other people whose work depend on mine. I also worked with a team distributed across the globe. I got the experience of working on a schedule, trying to deliver, bug-free, as much as possible without delays, getting the work done and at the same time have fun.

The most challenging part of participating in GSoC is the learning on the go and applying the newly acquired skills to your work. It sometimes happens that I do not have the complete knowledge or expertise about the new feature I'm trying to add, or an issue I'm trying to resolve. So I have to acquire that new skill, it might be using a new library, some method of solving that specific bug, etc. on the go and use it in my code, and move ahead in my timeline. I gained a lot of experience and knowledge from this and my problem solving skills got a boost.

My mentor at Percona has been extremely friendly and inclusive in making me feel right at home at the organization and helpful to me in every way he can. He is extremely active, energetic and helpful even with problems that might seem miniscule or easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment