hugoloza / googlepersonfinder

Automatically exported from code.google.com/p/googlepersonfinder
Apache License 2.0
0 stars 0 forks source link

Split server_tests.py into multiple files #76

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Problem: tests/server_test.py has more than 5K lines, which makes it a pain to 
edit and merge, especially when many people are developing in parallel.

Split tests/server_tests.py into separate files without a significant increase 
in time for all server tests to run.

E.g. split into

server_tests_api.py
server_tests_ui.py 
server_tests_admin.py
server_tests_utils.py (for common utilities)

Update tools/server_tests to run each set of tests.

Update this issue to indicate how long the tests take to run before and after 
refactoring.

Original issue reported on code.google.com by rom...@google.com on 11 Oct 2011 at 8:13

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Just a recording that time it takes to run server_tests before we made any 
changes.
Time: 633.897s

Original comment by nvin...@gmail.com on 12 Nov 2011 at 7:11

GoogleCodeExporter commented 9 years ago
Created a file to house the read only tests.  They can be run as 
server_tests_readOnly or with server_tests (which will run everything, 
including server_tests_readOnly).  The new file runs 23 tests 78.500s (two 
runs) compared to running 23 test in 78.590s before being housed separately.  
The modified server_test runs 86 tests in 634.739s, compared to 637.419s before 
modification.

Original comment by andrea.k...@gmail.com on 12 Nov 2011 at 10:52

GoogleCodeExporter commented 9 years ago
Suggestion: split so that the classes derived from TestsBase with the most code 
(e.g, ConfigTests, PersonNoteTests, and ReadOnlyTests) live in their own files 
and are invoked from server_tests.py. This would still leave PersonNoteTests at 
4K+ lines (50+ tests), while the others are a few hundred lines each, but it 
would be a good first step.

Original comment by rom...@google.com on 1 Dec 2011 at 11:58

GoogleCodeExporter commented 9 years ago

Original comment by kpy@google.com on 21 May 2013 at 9:37

GoogleCodeExporter commented 9 years ago
Raising the priority. This significantly reduces maintenance cost and makes it 
easier to add tests.

Original comment by r...@google.com on 21 Oct 2013 at 1:26