sauce.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/usr/bin/env node
  2. const user = process.env.SAUCE_USER
  3. , key = process.env.SAUCE_KEY
  4. , path = require('path')
  5. , brtapsauce = require('brtapsauce')
  6. , testFile = path.join(__dirname, 'basic-test.js')
  7. , capabilities = [
  8. { browserName: 'chrome' , platform: 'Windows XP', version: '' }
  9. , { browserName: 'firefox' , platform: 'Windows 8' , version: '' }
  10. , { browserName: 'firefox' , platform: 'Windows XP', version: '4' }
  11. , { browserName: 'internet explorer' , platform: 'Windows 8' , version: '10' }
  12. , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '9' }
  13. , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '8' }
  14. , { browserName: 'internet explorer' , platform: 'Windows XP', version: '7' }
  15. , { browserName: 'internet explorer' , platform: 'Windows XP', version: '6' }
  16. , { browserName: 'safari' , platform: 'Windows 7' , version: '5' }
  17. , { browserName: 'safari' , platform: 'OS X 10.8' , version: '6' }
  18. , { browserName: 'opera' , platform: 'Windows 7' , version: '' }
  19. , { browserName: 'opera' , platform: 'Windows 7' , version: '11' }
  20. , { browserName: 'ipad' , platform: 'OS X 10.8' , version: '6' }
  21. , { browserName: 'android' , platform: 'Linux' , version: '4.0', 'device-type': 'tablet' }
  22. ]
  23. if (!user)
  24. throw new Error('Must set a SAUCE_USER env var')
  25. if (!key)
  26. throw new Error('Must set a SAUCE_KEY env var')
  27. brtapsauce({
  28. name : 'Traversty'
  29. , user : user
  30. , key : key
  31. , brsrc : testFile
  32. , capabilities : capabilities
  33. , options : { timeout: 60 * 6 }
  34. })