Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: the "loadFonts" function calling on every test causes longer test execution and performance issues #113

Open
1 task done
vase4kin opened this issue Mar 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@vase4kin
Copy link

vase4kin commented Mar 6, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Version

v0.7.0

Description

Hi 👋

After using the “alchemist” library, I noticed that our test execution on CI takes more time, and sometimes it hangs on the tearDownAll function.

My use case of execution tests is a bit different. I run all the tests in one isolate, mainly to speed things up on CI. The testMain during test execution is called only once, along with the testExecutable at flutter_test_config.

Let’s say I have 100 golden tests. For each of them, the loadFonts function is called before the test, which takes time to execute. It is called 100 times. But should only once.

I would like to call this function only once before my tests execution, at flutter_test_config.

I forked the library, removed the loadFonts function call on every test execution, and moved it to the flutter_test_config. The problem was resolved.

Steps to reproduce

  1. Create a test file with ten goldens tests.
  2. Execute the tests.

Actual behavior: The loadFonts function is called ten times.

Expected behavior

The loadFonts function is called only once.

Screenshots

No response

Additional context and comments

Thanks for the library 🚀

@vase4kin vase4kin added the bug Something isn't working label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant