# IncludeTest

### Summary

The include directive is used to substitute text and/or code to a page.

### Positive Tests

positiveIncludeRel Test: Create a JSP page with an include directive which includes a file based on a relative URL. The included file should exist in the location specified.

title | IncludeTest
source | IncludeTest.java
executeClass | core_syntax.directives.include.IncludeTest
executeArgs | -TestCaseID positiveIncludeRel -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveIncludeAbs:Create a JSP with an include directive which has a path from the docroot of the Application in which the JSP page belongs . Included file should be in the location specified.

title | IncludeTest
source | IncludeTest.java
executeClass | core_syntax.directives.include.IncludeTest
executeArgs | -TestCaseID positiveIncludeAbs -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveIncludeDynamicAbs: We are testing for request time dynamic inclusion using jsp:include page tag. We test whether we get the included JSP parsed at request time and included JSP is send to the output. we use absolute path from doc root as url

title | IncludeTest
source | IncludeTest.java
executeClass | core_syntax.directives.include.IncludeTest
executeArgs | -TestCaseID positiveIncludeDynamicAbs -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveIncludeStaticAbs: We are testing for request time Static inclusion using jsp:include page tag. We test whether we get the included static content got included in the output. Here we use absolute path from doc root as url.

title | IncludeTest
source | IncludeTest.java
executeClass | core_syntax.directives.include.IncludeTest
executeArgs | -TestCaseID positiveIncludeStaticAbs -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveIncludeDynamicRel: We are testing for request time dynamic inclusion using jsp:include page tag. We test wether we get the included JSP parsed at request time and included JSP is send to the output. we use relative path from current context as url

title | IncludeTest
source | IncludeTest.java
executeClass | core_syntax.directives.include.IncludeTest
executeArgs | -TestCaseID positiveIncludeDynamicRel -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveIncludeStaticRel: We are testing for request time Static inclusion using jsp:include page tag. We test whether we get the included static content got included in the output.we use relative path from current context as url

title | IncludeTest
source | IncludeTest.java
executeClass | core_syntax.directives.include.IncludeTest
executeArgs | -TestCaseID positiveIncludeStaticRel -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSingleQuotes: We check whether request time attribute works with include with a scriptlet expression given in single quotes. We expect the output with the file included without error.

title | IncludeTest
source | IncludeTest.java
executeClass | core_syntax.directives.include.IncludeTest
executeArgs | -TestCaseID positiveSingleQuotes -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveDoubleQuotes: We check if request time attribute work with include with a scriptlet expression given in double quotes. We expect the output with the file included without error.

title | IncludeTest
source | IncludeTest.java
executeClass | core_syntax.directives.include.IncludeTest
executeArgs | -TestCaseID positiveDoubleQuotes -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

### Negative Tests

negativeInclude Test: Create a JSP page with an include directive which includes a file that does not exist in the location specified.

title | IncludeTest
source | IncludeTest.java
executeClass | core_syntax.directives.include.IncludeTest
executeArgs | -TestCaseID negativeInclude -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI