{"action":"created","issue":{"url":"https://api.github.com/repos/n1k0/casperjs/issues/1147","labels_url":"https://api.github.com/repos/n1k0/casperjs/issues/1147/labels{/name}","comments_url":"https://api.github.com/repos/n1k0/casperjs/issues/1147/comments","events_url":"https://api.github.com/repos/n1k0/casperjs/issues/1147/events","html_url":"https://github.com/n1k0/casperjs/issues/1147","id":56754171,"number":1147,"title":"Allow to specify test order in a config file","user":{"login":"erikmontes","id":179356,"avatar_url":"https://avatars.githubusercontent.com/u/179356?v=3","gravatar_id":"","url":"https://api.github.com/users/erikmontes","html_url":"https://github.com/erikmontes","followers_url":"https://api.github.com/users/erikmontes/followers","following_url":"https://api.github.com/users/erikmontes/following{/other_user}","gists_url":"https://api.github.com/users/erikmontes/gists{/gist_id}","starred_url":"https://api.github.com/users/erikmontes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikmontes/subscriptions","organizations_url":"https://api.github.com/users/erikmontes/orgs","repos_url":"https://api.github.com/users/erikmontes/repos","events_url":"https://api.github.com/users/erikmontes/events{/privacy}","received_events_url":"https://api.github.com/users/erikmontes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-06T00:50:16Z","updated_at":"2015-02-06T08:47:16Z","closed_at":null,"body":"If I have the following directory structure:\r\n```\r\nmytests/\r\n      a.js\r\n      b.js\r\n      c.js\r\n      d.js\r\n```\r\n\r\nCurrently if you run `casperjs test mytests/` it will run all tests in **alphabetical** order such as `a.js`, then `b.js`, then `c.js` and finally `d.js`.\r\n\r\nWhat if I want to specify the priority order? For example maybe I want `c.js` to be the first one to get executed followed by `b.js`. How can I do that?\r\n\r\nI tried looking for docs, but I don't think there is a way, I'm not sure. I found this [StackOverlfow comment](http://stackoverflow.com/questions/16371091/cant-split-casperjs-tests-across-multiple-files#comment23622654_16436493) by @n1k0 but I really don't want to do that.\r\n\r\n> name your files accordingly: 01_login.js, 02_otherpage.js –  NiKo May 9 '13 at 15:33\r\n\r\nI was thinking maybe there can be some sort of *config* file that is placed in the directory that specifies the order, maybe a .js or .json file, idk.\r\n\r\nFor example: \r\n```\r\nmytests/\r\n      a.js\r\n      b.js\r\n      c.js\r\n      d.js\r\n      casperconfig.js\r\n```\r\n\r\n`casperconfig.js`:\r\n```js\r\n{\r\n    'priority': ['c','b'], // the .js extension can be ignored\r\n    'log-level': 'debug',  // maybe we can even set the options here like this\r\n    'engine': 'phantomjs' // and this\r\n}\r\n```\r\n\r\nNow with this when I run `casperjs test mytests/` it'll first read `casperconfig.js` then execute `c.js`, `b.js` since the order was specified and the rest in alphabetical order last ones would be `a.js` and finally `d.js`.\r\n\r\nAny thoughts, or is there something like this already?"},"comment":{"url":"https://api.github.com/repos/n1k0/casperjs/issues/comments/73204457","html_url":"https://github.com/n1k0/casperjs/issues/1147#issuecomment-73204457","issue_url":"https://api.github.com/repos/n1k0/casperjs/issues/1147","id":73204457,"user":{"login":"rdpanek","id":230124,"avatar_url":"https://avatars.githubusercontent.com/u/230124?v=3","gravatar_id":"","url":"https://api.github.com/users/rdpanek","html_url":"https://github.com/rdpanek","followers_url":"https://api.github.com/users/rdpanek/followers","following_url":"https://api.github.com/users/rdpanek/following{/other_user}","gists_url":"https://api.github.com/users/rdpanek/gists{/gist_id}","starred_url":"https://api.github.com/users/rdpanek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdpanek/subscriptions","organizations_url":"https://api.github.com/users/rdpanek/orgs","repos_url":"https://api.github.com/users/rdpanek/repos","events_url":"https://api.github.com/users/rdpanek/events{/privacy}","received_events_url":"https://api.github.com/users/rdpanek/received_events","type":"User","site_admin":false},"created_at":"2015-02-06T08:47:16Z","updated_at":"2015-02-06T08:47:16Z","body":"I think, that doesn't. But it's important. My idea is, that I can run specify test via gulp watcher, because i work on small method or class and with save file I would like result from frontend. \r\n\r\nSecond thing. Sort of run test is important for suites and dependency.\r\n\r\nYou can send pull-request with you idea? :-)"}}