Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Parameters for runs #134

Open
Stuk opened this issue Mar 5, 2012 · 3 comments
Open

Parameters for runs #134

Stuk opened this issue Mar 5, 2012 · 3 comments

Comments

@Stuk
Copy link
Contributor

Stuk commented Mar 5, 2012

I'm not sure if this is a good idea, but it would be useful for me:

I would like to be able to send parameters to runs, so that I can have the same script on the screening server, but it could, as the major use case, be able to go to a different URL. I need this as each browser job on Jenkins has its own checkout of the montage code so that they don't interfere with each other.

Any thoughts?

@eliseosoto
Copy link
Collaborator

I think you can achieve this to some degree with script.require (see sample_tests/test-script.js and sample_tests/_test-required-script.js).

That would at least allow you to reuse code and modularize. However you'll still need to create a new script for each variant.

@Stuk
Copy link
Contributor Author

Stuk commented Mar 5, 2012

Okay so in my test script I would have

var url = script.require('config.js').url;
agent.gotoUrl(url);

// ... tests

and I before running this script I would PUT /scripts/:id with content similar to

{
  "name": "config.js",
  "code": "export.url = 'http://my url goes here';"
}

?

@irinamok
Copy link
Contributor

irinamok commented Mar 5, 2012

I think this request ties to the support of data-driven testing we were planning look into in M9 milestone. Let's give Stuart a work around with require for now, but in M9 I'd like us to have a better way to parametrize test scripts.

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

No branches or pull requests

3 participants