{"action":"created","issue":{"url":"https://api.github.com/repos/nette/tester/issues/318","repository_url":"https://api.github.com/repos/nette/tester","labels_url":"https://api.github.com/repos/nette/tester/issues/318/labels{/name}","comments_url":"https://api.github.com/repos/nette/tester/issues/318/comments","events_url":"https://api.github.com/repos/nette/tester/issues/318/events","html_url":"https://github.com/nette/tester/issues/318","id":160690478,"number":318,"title":"Feature request: set environment for a test job","user":{"login":"Fuco1","id":2664959,"avatar_url":"https://avatars.githubusercontent.com/u/2664959?v=3","gravatar_id":"","url":"https://api.github.com/users/Fuco1","html_url":"https://github.com/Fuco1","followers_url":"https://api.github.com/users/Fuco1/followers","following_url":"https://api.github.com/users/Fuco1/following{/other_user}","gists_url":"https://api.github.com/users/Fuco1/gists{/gist_id}","starred_url":"https://api.github.com/users/Fuco1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fuco1/subscriptions","organizations_url":"https://api.github.com/users/Fuco1/orgs","repos_url":"https://api.github.com/users/Fuco1/repos","events_url":"https://api.github.com/users/Fuco1/events{/privacy}","received_events_url":"https://api.github.com/users/Fuco1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-06-16T15:28:11Z","updated_at":"2016-06-16T16:34:23Z","closed_at":null,"body":"We use nette tester for integration testing, the combination of `@testCase` and test discovery makes it very simple to use & run parallel jobs.  However, one feature we miss is setting of environment variables for each job.  Databases and other services are configured through the environment, so it would be awesome if I could somehow set the variables for each job.\r\n\r\nThis has to be done via some meta-setting, outside of the **test code** because there it is already too late.  Something like `@dataProvider` or similar mechanism would be required.\r\n\r\nWhat do you think?"},"comment":{"url":"https://api.github.com/repos/nette/tester/issues/comments/226540732","html_url":"https://github.com/nette/tester/issues/318#issuecomment-226540732","issue_url":"https://api.github.com/repos/nette/tester/issues/318","id":226540732,"user":{"login":"Fuco1","id":2664959,"avatar_url":"https://avatars.githubusercontent.com/u/2664959?v=3","gravatar_id":"","url":"https://api.github.com/users/Fuco1","html_url":"https://github.com/Fuco1","followers_url":"https://api.github.com/users/Fuco1/followers","following_url":"https://api.github.com/users/Fuco1/following{/other_user}","gists_url":"https://api.github.com/users/Fuco1/gists{/gist_id}","starred_url":"https://api.github.com/users/Fuco1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fuco1/subscriptions","organizations_url":"https://api.github.com/users/Fuco1/orgs","repos_url":"https://api.github.com/users/Fuco1/repos","events_url":"https://api.github.com/users/Fuco1/events{/privacy}","received_events_url":"https://api.github.com/users/Fuco1/received_events","type":"User","site_admin":false},"created_at":"2016-06-16T16:34:23Z","updated_at":"2016-06-16T16:34:23Z","body":"@milo We configure our application by setting environment variables like DATABASE_NAME, DATABASE_PASS and so on (according to http://12factor.net/config), so I would need to set those before running the tests.\r\n\r\n@JanTvrdik I think it will be too late there because the settings are assigned to parameters in the configurator (for nette/di) and that is loaded with the bootstrap before the test, so it's already too late in the setUp (we have our own \"environment\" nette extension which sets up parameters by collecting the environment variables).\r\n\r\nThese will be integration tests so ideally they would run the same way as production, which also means loading the bootstrap.  I don't know if nette/tester is a good tool to do this, maybe it's not designed for such setup?"}}
{"actor":{"display_login":"Fuco1"}}