2

Im trying to pass a string parameter from jenkins into my selenium project as its a parameter that need to be updated a lot and some people using it arent familiar with changing the file in git every time it needs to be ran. However the parameter doesnt seem to be passing in at all. My jenkins setup is this enter image description here

enter image description here

And my selenium setup is

private static String appID = prop.getProperty("appID");

with a properties file where appID is set.

I would like to override the value set in selenium when there is something entered the jenkins value but it doesnt seem to be working

1 Answer 1

1

The quick solution can be

private static String appID = System.getProperty("appID", prop.getProperty("appID"));

You also can start using QAF which has this feature. QAF properties configuration has many useful features to satisfy automation basic needs. You can provide property in multiple ways. For any property, value provided through system property has highest preference.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.