Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic 'testname' option #90

Open
wintondeshong opened this issue Jan 13, 2014 · 2 comments
Open

Dynamic 'testname' option #90

wintondeshong opened this issue Jan 13, 2014 · 2 comments

Comments

@wintondeshong
Copy link

I noticed that if you do not set the options.testname optional parameter, the output will include the proper operating system and browser (http://cl.ly/image/0e3I3D3Q3j19) while rendering the web-based output's 'session' column with "unnamed job" (http://cl.ly/image/1A2M1d0f3n3Q). Is there a way to add that as a variable to be interpolated by saucelabs (Example: "My Project: #{TEST_ENVIRONMENT}") while maintaining both the console output and web-based session column?

@Jonahss
Copy link
Collaborator

Jonahss commented Jan 13, 2014

How about setting the 'testname' parameter to optionally accept a function. The test runner will pass in a configuration object, and whatever the function returns will be the name of the test. Like so:

testname: function(config){
  return "My Project: " + config.platform + " : " + config.framework;
}

Work for you?

@wintondeshong
Copy link
Author

That would be perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants