{"action":"created","issue":{"url":"https://api.github.com/repos/catapult-project/catapult/issues/1893","labels_url":"https://api.github.com/repos/catapult-project/catapult/issues/1893/labels{/name}","comments_url":"https://api.github.com/repos/catapult-project/catapult/issues/1893/comments","events_url":"https://api.github.com/repos/catapult-project/catapult/issues/1893/events","html_url":"https://github.com/catapult-project/catapult/issues/1893","id":126848478,"number":1893,"title":"Should we move large test cases into separate files?","user":{"login":"petrcermak","id":2546601,"avatar_url":"https://avatars.githubusercontent.com/u/2546601?v=3","gravatar_id":"","url":"https://api.github.com/users/petrcermak","html_url":"https://github.com/petrcermak","followers_url":"https://api.github.com/users/petrcermak/followers","following_url":"https://api.github.com/users/petrcermak/following{/other_user}","gists_url":"https://api.github.com/users/petrcermak/gists{/gist_id}","starred_url":"https://api.github.com/users/petrcermak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrcermak/subscriptions","organizations_url":"https://api.github.com/users/petrcermak/orgs","repos_url":"https://api.github.com/users/petrcermak/repos","events_url":"https://api.github.com/users/petrcermak/events{/privacy}","received_events_url":"https://api.github.com/users/petrcermak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/catapult-project/catapult/labels/Code%20Health","name":"Code Health","color":"fbca04"},{"url":"https://api.github.com/repos/catapult-project/catapult/labels/Enhancement","name":"Enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/catapult-project/catapult/labels/P3","name":"P3","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-01-15T10:39:02Z","updated_at":"2016-01-18T23:03:18Z","closed_at":null,"body":"I have recently worked on some algorithmic processing components of Trace Viewer that required quite a lot of tests where the **expected outputs** were **large trees and graphs**:\r\n\r\nhttps://github.com/catapult-project/catapult/blob/master/tracing/tracing/model/global_memory_dump_test.html\r\nhttps://github.com/catapult-project/catapult/blob/master/tracing/tracing/base/multi_dimensional_view_test.html\r\n\r\nIn their reviews of my latest patch (https://codereview.chromium.org/1585983004/), @primiano and @ruud-v-a suggested that these test cases could be moved to **separate files**. I searched through our codebase and found 3 similar use cases (2 of which seem to be marked as TODOs for removal, #1219?):\r\n\r\nhttps://github.com/catapult-project/catapult/blob/master/perf_insights/perf_insights/ui/pi_app_main_test.html\r\nhttps://github.com/catapult-project/catapult/blob/master/perf_insights/perf_insights/ui/reports/task_info_report_test.html\r\nhttps://github.com/catapult-project/catapult/blob/master/perf_insights/perf_insights/ui/reports/weather_report_test.html\r\n\r\nI don't have a very strong opinion about this, but it does feel a little strange to check in large HTML files 90% of which are huge object literals.\r\n\r\n@natduca, @dj2: What are your views on this? I assume this is even more relevant for PI, which is all about processing lots of data."},"comment":{"url":"https://api.github.com/repos/catapult-project/catapult/issues/comments/172676749","html_url":"https://github.com/catapult-project/catapult/issues/1893#issuecomment-172676749","issue_url":"https://api.github.com/repos/catapult-project/catapult/issues/1893","id":172676749,"user":{"login":"ruud-v-a","id":506953,"avatar_url":"https://avatars.githubusercontent.com/u/506953?v=3","gravatar_id":"","url":"https://api.github.com/users/ruud-v-a","html_url":"https://github.com/ruud-v-a","followers_url":"https://api.github.com/users/ruud-v-a/followers","following_url":"https://api.github.com/users/ruud-v-a/following{/other_user}","gists_url":"https://api.github.com/users/ruud-v-a/gists{/gist_id}","starred_url":"https://api.github.com/users/ruud-v-a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruud-v-a/subscriptions","organizations_url":"https://api.github.com/users/ruud-v-a/orgs","repos_url":"https://api.github.com/users/ruud-v-a/repos","events_url":"https://api.github.com/users/ruud-v-a/events{/privacy}","received_events_url":"https://api.github.com/users/ruud-v-a/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T23:03:18Z","updated_at":"2016-01-18T23:03:18Z","body":"Ah, I see. So you verified the 6000 lines of json manually and reviewers would need to do that as well?\r\n\r\nIt could be a sign that the test is trying to test at the wrong level? If you can factor the thing into two orthogonal components with m states and n states, then instead of testing all n*m states, you only need to test m + n states. (So roughly 6000 lines → 150 lines if m ≈ n.)"}}