<s:textfield name="test" value="%{test}">
That should work.
If you have a getTest() method in your Action class, you can simplify it to -
<s:textfield name="test" />
<input type="text" name="test" id="test" value ="<%=test %>"/>
This, OTOH, should not be working, unless you are creating a variable 'test' in your JSP.