shelly-homekit icon indicating copy to clipboard operation
shelly-homekit copied to clipboard

More Testing

Open juangamnik opened this issue 4 years ago • 11 comments

I would like to add some end2end tests. I have not planned any details, yet. Is there interest?

juangamnik avatar Feb 12 '21 20:02 juangamnik

there's plenty of interest, for sure. i think best start is to use the ubuntu port, it requires no additional hardware. after that we can consider adding tests on real devices.

rojer avatar Feb 13 '21 13:02 rojer

The idea is more or less to have some selenium/webdriver tests that try out some features. They can either be executed on a real device (configuring the target address of the web UI) or a simulated machine... is there a simulator (I do not know the capabilities of mongoose here, sorry)

juangamnik avatar Feb 13 '21 13:02 juangamnik

make ShellyU will build a binary that can be run on a Ubuntu linux system and represents a fully functioning device, except of course there are no real outputs. but web interface is fully functional (except for wifi) and the accessory can be discovered and added to the Home app. in addition, the binary is build with address sanitizer enabled, so it will catch leaks and other memory management bugs.

rojer avatar Feb 13 '21 13:02 rojer

in fact, i do most of my developemnt on the ShellyU port:

$ make ShellyU && rsync -av --exclude=*.gz fs_ShellyU/ build_ShellyU/fs/ && ASAN_SYMBOLIZER_PATH=$(realpath /usr/bin/llvm-symbolizer-*) LLVM_PROFILE_FILE=${PWD}/llvm.prof build_ShellyU/objs/*.elf --insecure --chroot build_ShellyU/fs

rojer avatar Feb 13 '21 13:02 rojer

Maybe we can use the GitHub action runner for Mac and use docker inside to run the ubuntu build. Then we can use the Mac home app to control the Ubuntu device.

timoschilling avatar Feb 13 '21 15:02 timoschilling

Sounds great, I will start with something easy and come back to you.

juangamnik avatar Feb 13 '21 19:02 juangamnik

Just a notice I’m currently working on a rewrite using the preact framework. Maybe this will effect your work. Maybe then we should wait with the tests?

timoschilling avatar Feb 14 '21 10:02 timoschilling

You are right. We are using react (and react native) with typescript a lot at work. I didn‘t know preact... sounds good. Please use Typescript and not plain JavaScript, ok? 😇

juangamnik avatar Feb 14 '21 18:02 juangamnik

This issue is stale because it has been open 30 days with no activity. Comment or this will be closed in 7 days.

github-actions[bot] avatar Mar 17 '21 02:03 github-actions[bot]

@timoschilling is the frontend rewrite done?

juangamnik avatar Apr 05 '21 16:04 juangamnik

@juangamnik no work will continue in the next week

timoschilling avatar Apr 05 '21 18:04 timoschilling