ScriptletTest

Summary

Scriptlets can contain any code fragment that are valid for the scripting language specified in the 'language' directive.These are executed at request-processing time.

Positive Tests

positiveScriptlet Test: Create a valid scriptlet in the JSP page. Assume a scriptlet where the value of a variable is incremented. Send the value of the variable to the out stream.

title ScriptletTest
source ScriptletTest.java
executeClass core_syntax.scripting.scriptlet.ScriptletTest
executeArgs -TestCaseID positiveScriptlet -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI

positiveScriptletMultiline Test: Create a valid scriptlet in the JSP page that spans multiple lines.

title ScriptletTest
source ScriptletTest.java
executeClass core_syntax.scripting.scriptlet.ScriptletTest
executeArgs -TestCaseID positiveScriptletMultiline -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI

positiveScriptletMultiline2 Test: Test with a valid scriptlet that has multiple tags in a single line.

title ScriptletTest
source ScriptletTest.java
executeClass core_syntax.scripting.scriptlet.ScriptletTest
executeArgs -TestCaseID positiveScriptletMultiline2 -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI

positiveScriptletUseBean Test: Create a valid useBean action in the JSP. After that, use a scriptlet to change the value of a specific bean property. Send the new value of the property to the out stream.

title ScriptletTest
source ScriptletTest.java Counter.java
executeClass core_syntax.scripting.scriptlet.ScriptletTest
executeArgs -TestCaseID positiveScriptletUseBean -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI

positiveScriptletComment Test: Create a scriptlet which contains only a Java comment in it on a JSP page.

title ScriptletTest
source ScriptletTest.java
executeClass core_syntax.scripting.scriptlet.ScriptletTest
executeArgs -TestCaseID positiveScriptletComment -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI

positiveScriptletLiteral Test: Use the scriptlet end tag as a literal within the scriptlet (say in a out.println() statement.

title ScriptletTest
source ScriptletTest.java
executeClass core_syntax.scripting.scriptlet.ScriptletTest
executeArgs -TestCaseID positiveScriptletLiteral -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI

Negative Tests

negativeScriptletSyntax Test: Create an invalid scriptlet by not terminating the java statement with a semicolon (;)

title ScriptletTest
source ScriptletTest.java
executeClass core_syntax.scripting.scriptlet.ScriptletTest
executeArgs -TestCaseID negativeScriptletSyntax -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI