question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom threshold for test time warning/errors

See original GitHub issue

🚀 Feature Proposal

Provide a custom way to set the thresholds for when the time in the logged output is highlighted (red, for example, when a suite/test takes a long time).

Even a way to turn these warning colors off would be useful.

Motivation

Some tests are known to take a long time (e.g. spinning up databases, testing database operations), and it’d be nice to not be warned with those colors when running tests.

Example

In the config, some options like timeWarningThreshold where the user could specify the threshold themselves. Or, disabledTimeWarnings to turn them off completely.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:38
  • Comments:10

github_iconTop GitHub Comments

14reactions
sylvain-hamelcommented, Feb 26, 2019

I use jest to drive selenium tests and it reports a test that takes 12 seconds as being slow (the duration is highlighted in red). In this context 12 seconds is fine.

In jest.config.js I’d like an option to change the default

  slowTestDurationThreshold: 30

The value is hardcoded at 5 seconds at the moment. https://github.com/facebook/jest/blob/b4897796bcbcb972234ef699b3e9e0f6b8724132/packages/jest-reporters/src/get_result_header.js#L44-L46

https://stackoverflow.com/questions/54893177/jest-threshold-for-a-test-to-be-reported-as-slow

5reactions
SimenBcommented, Jul 30, 2020

Released in 26.2.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Thresholds
Thresholds are a pass/fail criteria used to specify the performance expectations of the system under test.
Read more >
Understanding training and testing validation result manifests
During training, Amazon Rekognition Custom Labels creates validation result ... Lines don't count towards the 20% error threshold for training and testing.
Read more >
BurnInTest V9.0 Users Guide
PassMark's BurnInTest is a software tool that allows all the major sub-systems of a computer to be simultaneously tested for reliability and stability....
Read more >
Set thresholds for an alert condition
When you create a condition, you set personalized thresholds that determine what will open an incident. This document explains what thresholds are and...
Read more >
QtPlasmaC
Base machine requirements such as limit switches, home switches, ... The default probe test hold time is 10 seconds, this value may be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found