FlakeGuard (Open Source Product)

FlakeGuard aims to find tests that pass one time, and may fail another time, despite not changing any written code. 

Curious about what flaky tests are - checkout this article, before diving into the benefits of utilizing FlakeGuard!

What is FlakeGua…


This content originally appeared on DEV Community and was authored by Ashley Hannigan

FlakeGuard aims to find tests that pass one time, and may fail another time, despite not changing any written code. 

Curious about what flaky tests are - checkout this article, before diving into the benefits of utilizing FlakeGuard!

What is FlakeGuard?
FlakeGuard is a free, open-source tool that allows developers to run Jest tests to automatically detect and report flaky tests in the development process.
Flaky tests can be flagged, and viewed visually through a variety of charts and metrics, see here.

Image description
Set-Up
Install: npm i flake-guard --save-dev
Run FlakeGuard: npx flake-guard <filename> with the name of the test file that you want to examine.

FlakeGuard will analyze your E2E tests for flakiness by executing multiple test runs and analyzing the results. 
Once all tests have run successfully, simply press enter in the terminal to be redirected to flake-guard's website. 

Configure FlakeGuard
The default number of test runs is 10, but this can be adjusted as described below. 
To adjust FlakeGuard configuration variables, you can create a file in the root directory of your project calledfg.config.json.

How FlakeGuard Works  - "Under the hood":
The flake-guard npm package is automating repeated runs of your test file. It will do a basic parsing of the results locally to log an object in your terminal with all of your test assertions and their pass/fail metrics. It sends off the raw Jest results objects to the FlakeGuard server for further analysis which you can view at

FlakeGuard Web Application:
FlakeGuard Sample DashboardView analytics including, but not limited to:

  • Passing vs failing tests with the color coordinated flake severity table
  • Analyze Runtime metrics & API response times
  • See flaky test flags
  • View pointers showing fail points within test code
  • Running test order permutation
  • Display flake improvement over time

Other articles:
Flaky Tests - How to Overcome Testing Nightmares
https://medium.com/@ashleyhannigan88/flaky-tests-how-to-overcome-testing-nightmares-cdf661b51464


This content originally appeared on DEV Community and was authored by Ashley Hannigan


Print Share Comment Cite Upload Translate Updates
APA

Ashley Hannigan | Sciencx (2024-08-15T04:28:40+00:00) FlakeGuard (Open Source Product). Retrieved from https://www.scien.cx/2024/08/15/flakeguard-open-source-product/

MLA
" » FlakeGuard (Open Source Product)." Ashley Hannigan | Sciencx - Thursday August 15, 2024, https://www.scien.cx/2024/08/15/flakeguard-open-source-product/
HARVARD
Ashley Hannigan | Sciencx Thursday August 15, 2024 » FlakeGuard (Open Source Product)., viewed ,<https://www.scien.cx/2024/08/15/flakeguard-open-source-product/>
VANCOUVER
Ashley Hannigan | Sciencx - » FlakeGuard (Open Source Product). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/08/15/flakeguard-open-source-product/
CHICAGO
" » FlakeGuard (Open Source Product)." Ashley Hannigan | Sciencx - Accessed . https://www.scien.cx/2024/08/15/flakeguard-open-source-product/
IEEE
" » FlakeGuard (Open Source Product)." Ashley Hannigan | Sciencx [Online]. Available: https://www.scien.cx/2024/08/15/flakeguard-open-source-product/. [Accessed: ]
rf:citation
» FlakeGuard (Open Source Product) | Ashley Hannigan | Sciencx | https://www.scien.cx/2024/08/15/flakeguard-open-source-product/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.