Hi Jesse, Thanks for the pointers, I'll dig in and take a look - I'll be happy if I can just poke some text boxes to get started. I hadn't considered the async nature of validation checks, so thanks for that tip! think it makes sense to check that the validation is being called as well as checking the correctness of the validation so I think there is some sense to testing that via the config page iteself.
Ta, Andy On Tuesday, 25 November 2014 15:49:40 UTC, Jesse Glick wrote: > > On Tue, Nov 25, 2014 at 5:09 AM, AndyB <[email protected] <javascript:>> > wrote: > > This should be easy shouldn't it? > > Well, not exactly easy, but not that hard. Poke around in > jenkinsci/jenkins/test/src/test/java/ and you will find some tests > doing this kind of thing. > > BTW if you mainly want to test form validation, it is easier to just > call the doCheck* methods directly. Testing them from the context of a > live form is going to be messier. For one thing, even errors will not > block the form from being submitted, so you would have to > screen-scrape the page before submitting. And beware that the checks > are done asynchronously, so you would need to use some HtmlUnit > utility method to wait for the results to come back. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f0331d1e-9a09-4c7f-9d85-cac9cd100103%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
