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

Homematic IP Cloud tests are slow #31794

Closed
balloob opened this issue Feb 13, 2020 · 5 comments · Fixed by #31810
Closed

Homematic IP Cloud tests are slow #31794

balloob opened this issue Feb 13, 2020 · 5 comments · Fixed by #31810

Comments

@balloob
Copy link
Member

balloob commented Feb 13, 2020

The problem

The Homematic IP Cloud tests load a lot of data. 6000 lines. This fixture is used for every test. Right now it takes 43 seconds on my machine to run 83 Homematic IP Cloud tests. Our total test run time is 28 min!

As a quick test I took the existing fixture and removed all clients, devices and groups. Still 34 tests passed.

The fixture for homematic IP cloud should be broken up in a per-device part. So the binary sensor fixture should only contain the info needed for the binary sensor test.

Environment

  • Home Assistant release with the issue:
  • Last working Home Assistant release (if known):
  • Operating environment (Hass.io/Docker/Windows/etc.):
  • Integration causing this issue:
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml

Traceback/Error logs

Additional information

@probot-home-assistant
Copy link

Hey there @SukramJ, mind taking a look at this issue as its been labeled with a integration (homematicip_cloud) you are listed as a codeowner for? Thanks!

@SukramJ
Copy link
Contributor

SukramJ commented Feb 13, 2020

OK, I will check how many seconds can be saved.

@MartinHjelmare
Copy link
Member

Another approach is to drop the fixture completely and instead patch and spec the interfaces in the library. We discussed this before.

@SukramJ
Copy link
Contributor

SukramJ commented Feb 13, 2020

I know, but i have no good starting point for this. The hmip devices are quite complex compared to lights.
I can get rid of the fixture and try to get it from the homematicip lib.

@balloob
Copy link
Member Author

balloob commented Feb 13, 2020

I think a good first step would just be to not load climate devices when testing sensors etc. We're setting up a full homematic system up on each test and then check if 1 out of many entities is the right state.

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

Successfully merging a pull request may close this issue.

3 participants