# Setproperty test

### Summary

The 'jsp:setProperty' action sets the value of the properties in the bean.The 'name' attribute denotes an object that must be defined before this action appears.

## Positive tests

positiveUseBeanInit:Try to create a valid useBean action.In the action, add a setProperty statement to set a specific property of the bean. Ensure that the bean class does not exist before calling the page.Calling the page for the first time.

title | SetpropertyTest
source | SetpropertyTest.java SetpropBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveUseBeanInit -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetPropParam:Try to create a valid useBean.Set a specific property of that bean from the request.

title | SetpropertyTest
source | SetpropertyTest.java SetpropBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetPropParam -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetPropValue:Try to create a useBean action in JSP.Set a specific property of that bean .

title | SetpropertyTest
source | SetpropertyTest.java SetpropBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetPropValue -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetPropAll:Try to create a valid useBean action.Set all the properties of the bean from the request.

title | SetpropertyTest
source | SetpropertyTest.java SetpropBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetPropAll -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveUseBeanNext:Try to create a valid useBean.In the body of the action, put setProperty statements to set the specific properties of the bean.Ensured that the bean exists already.

title | SetpropertyTest
source | SetpropertyTest.java SetpropBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveUseBeanNext -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSingleQuotes: check whether a value in the setProperty given as a single quoted expression works

title | SetpropertyTest
source | SetpropertyTest.java MiscBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSingleQuotes -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetBooleanObj: To check whether setProperty with a Boolean (object) is working in the bean.

title | SetpropertyTest
source | SetpropertyTest.java MiscBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetBooleanObj -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetBooleanPrim: To check whether setProperty with a Boolean (Primitive Type) is working in the bean.

title | SetpropertyTest
source | SetpropertyTest.java MiscBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetBooleanPrim -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetByteObj: To check whether setProperty with a Byte (object) is working in the bean.

title | SetpropertyTest
source | SetpropertyTest.java MiscBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetByteObj -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetBytePrim: To check whether setProperty with a Byte (Primitive Type) is working in the bean.

title | SetpropertyTest
source | SetpropertyTest.java MiscBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetBytePrim -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetCharObj: To check whether setProperty with a Char (object) is working in the bean.

title | SetpropertyTest
source | SetpropertyTest.java MiscBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetCharObj -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetCharPrim: To check setProperty with a Char (Primitive Type) is working in the bean.

title | SetpropertyTest
source | SetpropertyTest.java MiscBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetCharPrim -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetDoubleObj: To check setProperty with a Double (object) is working in the bean.

title | SetpropertyTest
source | SetpropertyTest.java MiscBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetDoubleObj -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetDoublePrim: To check setProperty with a Double (Primitive Type) is working in the bean.

title | SetpropertyTest
source | SetpropertyTest.java MiscBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetDoublePrim -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetIntObj: To check setProperty with an Int (object) is working in the bean.

title | SetpropertyTest
source | SetpropertyTest.java MiscBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetIntObj -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetIntPrim: To check setProperty with an Int (Primitive Type) is working in the bean.

title | SetpropertyTest
source | SetpropertyTest.java MiscBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetIntPrim -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetFloatObj: To check setProperty with a Float (object) is working in the bean.

title | SetpropertyTest
source | SetpropertyTest.java MiscBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetFloatObj -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetFloatPrim: To check setProperty with a Float (Primitive Type) is working in the bean.

title | SetpropertyTest
source | SetpropertyTest.java MiscBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetFloatPrim -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetLongObj: To check setProperty with a Long (object) is working in the bean.

title | SetpropertyTest
source | SetpropertyTest.java MiscBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetLongObj -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetLongPrim: To check setProperty with a Long (Primitive Type) is working in the bean.

title | SetpropertyTest
source | SetpropertyTest.java MiscBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetLongPrim -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetPropNoParam: A bean is instantiated and its property is set from the request.

title | SetpropertyTest
source | SetpropertyTest.java SetpropBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetPropNoParam -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

positiveSetIndexedProp:Here, the setProperty tag is used to set the value for an indexed property.An array is declared and defined in a scriptlet and then assigned through the setProperty tag, with an expression.

title | SetpropertyTest
source | SetpropertyTest.java SetpropBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID positiveSetIndexedProp -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI

## Negative tests

negativePropSyntax: Try to create a valid useBean tag.Use both param and value in the setProperty action.Expected for translation error.

title | SetpropertyTest
source | SetpropertyTest.java SetpropBean.java
executeClass | core_syntax.beantests.setProperty.SetpropertyTest
executeArgs | -TestCaseID negativePropSyntax -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive extensionAPI