{"action":"created","issue":{"url":"https://api.github.com/repos/mmanela/chutzpah/issues/552","repository_url":"https://api.github.com/repos/mmanela/chutzpah","labels_url":"https://api.github.com/repos/mmanela/chutzpah/issues/552/labels{/name}","comments_url":"https://api.github.com/repos/mmanela/chutzpah/issues/552/comments","events_url":"https://api.github.com/repos/mmanela/chutzpah/issues/552/events","html_url":"https://github.com/mmanela/chutzpah/issues/552","id":174167911,"number":552,"title":"Test discoverer reports \"cannot find path\" errors for large test files with many ajax calls","user":{"login":"seans83","id":16937956,"avatar_url":"https://avatars.githubusercontent.com/u/16937956?v=3","gravatar_id":"","url":"https://api.github.com/users/seans83","html_url":"https://github.com/seans83","followers_url":"https://api.github.com/users/seans83/followers","following_url":"https://api.github.com/users/seans83/following{/other_user}","gists_url":"https://api.github.com/users/seans83/gists{/gist_id}","starred_url":"https://api.github.com/users/seans83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seans83/subscriptions","organizations_url":"https://api.github.com/users/seans83/orgs","repos_url":"https://api.github.com/users/seans83/repos","events_url":"https://api.github.com/users/seans83/events{/privacy}","received_events_url":"https://api.github.com/users/seans83/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-08-31T02:07:41Z","updated_at":"2016-09-25T23:06:05Z","closed_at":null,"body":"We have a large project with many test files. These test files test methods and objects that make use of many $.getJSON and $.ajax calls. When a test file grows to a certain size, these ajax calls start to report errors in the output window e.g.:\r\n\r\nError: Error: Error opening /Controller/SomeMethodName: The system cannot find the path specified.\r\nWhile Running:C:\\test-file.ts\r\n\r\nThis is reported during test discovery after making a change to a test file.\r\n\r\nWe've found that by breaking these large test files down into smaller test files, this temporarily fixes the problem, however as those test files grow, the error returns.\r\n\r\nThis error doesn't prevent Visual Studio Test Explorer from being able to run the tests, however, since they are reported on TFS as well, they do prevent the Test build step from completing.\r\n\r\nNB: We are using the jasmine testing framework."},"comment":{"url":"https://api.github.com/repos/mmanela/chutzpah/issues/comments/249452464","html_url":"https://github.com/mmanela/chutzpah/issues/552#issuecomment-249452464","issue_url":"https://api.github.com/repos/mmanela/chutzpah/issues/552","id":249452464,"user":{"login":"seans83","id":16937956,"avatar_url":"https://avatars.githubusercontent.com/u/16937956?v=3","gravatar_id":"","url":"https://api.github.com/users/seans83","html_url":"https://github.com/seans83","followers_url":"https://api.github.com/users/seans83/followers","following_url":"https://api.github.com/users/seans83/following{/other_user}","gists_url":"https://api.github.com/users/seans83/gists{/gist_id}","starred_url":"https://api.github.com/users/seans83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seans83/subscriptions","organizations_url":"https://api.github.com/users/seans83/orgs","repos_url":"https://api.github.com/users/seans83/repos","events_url":"https://api.github.com/users/seans83/events{/privacy}","received_events_url":"https://api.github.com/users/seans83/received_events","type":"User","site_admin":false},"created_at":"2016-09-25T23:06:05Z","updated_at":"2016-09-25T23:06:05Z","body":"Yeah that's the problem. The locations I put in those ajax calls are arbitrary, but if I called say '/<controller>/<methodname>' for any method that returns a json result in a solution, the problem still occurs. Like I said though, it only seems to happen when you go above a certain number of unit tests in  a test file. If you take half the unit tests out of that test file, and remove for example the method calls from the objects constructor - the error does not occur. \r\nSecondly, the error is only present during discovery - you can run those unit tests and they will all work just fine. The issue is, that because that error is reported in discovery, it's reported as an error in TFS during a build step so the test step fails, even though if the test was allowed to run regardless; it would pass. In Visual Studio, the error is reported in the output window, but you can still run the tests no problem.\r\n\r\nYes, it is the object that makes the calls, however, since the error is being reported during discovery and not when the tests are actually being run, it seems the problem exists because somewhere during test discovery, the test object is being parsed incorrectly. If I take the test object out of chutzpah.json, the tests get discovered anyway - so why does the object being tested need to be used during test discovery if the tests are being found anyway?\r\n\r\nI hope that makes sense.\r\n\r\nSorry :)"}}
{"actor":{"display_login":"seans83"}}