[yast-devel] Webyast - proposal of test&commit rules
Hi, due to low test coverage and low quality of test case and code I think it is needed to set some basic rules which ensure some level of code and tests ( maybe you can be surprised how writing test improve code quality, because write tests to method which is more then one page long is extremely annoying, also properly test each XY parameters of method is really annoying, and testing model is much simpler then testing controllers or views). So proposal: - keep prerelease rule - no fix without failing test ( you must at first show test which demonstrate bug and then fix it in separate commit (but I suggest do it in one push to not break hudson)) - it has exception for fixes of spec file and lighttp configuration and UI redesign. - develop new functionality in branch and before merge check test (and only tests not code or run webyast) that functionality is implemented as expected - all plugins must have test case - commit often (so it is easier to review and test this small part). I think that you should commit at least once per day. FAQ: Q: It is hard to test THIS fix ( it is in controller, view, long method, corner case etc.)! A: Then code is not have enough quality. For corner case it is more important to write test for them to prevent regression. First bug can happen, regression is problem of tests, this cannot happen. Q: It is hard to write tests for webclient! A: I agree for previous release. Now it is quite easy and simple howto mail follow this one. Q: I don't know how to create branch in git! A: Ask on IRC! (for this case it is quite easy to do it) Q: I have another problem A: Ask on IRC or on mail if it is long story. I welcome any suggestions or comments. After discuss it will be placed on wiki. What you suggest if commit don't follow rules - immediately revert? Schubi - maybe we could add rule that working XML response for each model in webclient be as file fixture with same name as path on backend to be easy load by sinatra? Josef -- Josef Reidinger YaST team maintainer of perl-Bootloader, YaST2-Repair, webyast (language,time,basesystem,ntp) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Josef Reidinger schrieb:
Schubi - maybe we could add rule that working XML response for each model in webclient be as file fixture with same name as path on backend to be easy load by sinatra?
In the last few days the environment of Selenium has been changed. Benji is implementing a test environment for Selenium that is based on an running appliance. So i think that sinatra will not be needed anymore in the future although I have really liked. But in order to reduce the test frameworks I would suggest to drop the sinatra stuff now. Greetings Stefan -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Josef Reidinger <jreidinger@suse.cz> [Jan 14. 2010 13:26]: [proposal removed to save space] Josef, thanks for the proposal.
I welcome any suggestions or comments. After discuss it will be placed on wiki. What you suggest if commit don't follow rules - immediately revert?
First we have to detect failure to follow the rules. Any ideas how to automate this and send people a friendly remainder ? Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Klaus Kaempf write:
* Josef Reidinger <jreidinger@suse.cz> [Jan 14. 2010 13:26]: [proposal removed to save space]
Josef,
thanks for the proposal.
I welcome any suggestions or comments. After discuss it will be placed on wiki. What you suggest if commit don't follow rules - immediately revert?
First we have to detect failure to follow the rules. Any ideas how to automate this and send people a friendly remainder ?
Automatic detection of breaking rules is hard, becase not all commit must touch test directory, because some fix could just change icon or spec file. But I hope, that if developers habituate to write test code. So I hope manual check is enough. Question is if is better to send mail reminder, IRC or write comment to gitorious. Josef -- Josef Reidinger YaST team maintainer of perl-Bootloader, YaST2-Repair, webyast (language,time,basesystem,ntp) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (3)
-
Josef Reidinger
-
Klaus Kaempf
-
Stefan Schubert