I m working on application tests and have found an issue. My app. has an authenticate(email, password) action inside the Security controller and when invoked, from the login page, with a valid e-mail and invalid password it sends me back to the login page with an error message, located in the flash scope.
App. 测试代码如下:
Response response =
GET("/security/authenticate?email=validUser&password=invalid", true);
String pattern = "invalid password";
assertContentMatch(pattern, response);
当运行此代码时, 下一个例外 :
A java.lang.RuntimeException has been caught,
java.net.MalformedURLException: no protocol: /login
有些研究发现:
- the exception is thrown when a new URL object creation is attempted, to be able for redirection, using an invalid URL. In this case no protocol is present
- looking at app. test in samples apps. GET is used without redirection, meaning that after GET only the http code is verified but no attempt to follow the redirection
Has anyone had this same issue also ? Any open bug to look for info or add my 2 cents ?