Use case scenario 3 – helping your users through UI automation
Customizing and automating the Jenkins user interface can help and empower users of your Jenkins instance to help themselves.
By ensuring that it is possible only for your users to input valid data, we can greatly reduce the risk of invalid input and the resulting issues, which should improve the user experience too.
The most common way to do this is to validate the user input at runtime. For example, if your job prompts the user to enter a day of the week or a build number, you may assign this to a variable called something like $WEEKDAY
or $MY_BUILD_NUM
respectively.
We can then set up our job to ensure that the supplied user data is valid—if the value of $WEEKDAY
is not a valid day of the week, or the user has supplied the build number as Build Two
instead of an integer value that we may have been hoping for, we can cause the build to fail with an error message explaining what the user has done wrong and how to...