functional testing - how to test playframework's tag and do I need do that -
functional testing - how to test playframework's tag and do I need do that -
when create new playframewor's tag. need create test (assuming utilize tdd)? , how possible , best practice doing tests tags in general?
for illustration there piece of code utilize tag "my_tag":
#{my_tag param1:value1, param2:value2 }
if think tag little.. piece of presentation renders on page use. should test how handle parameters , how render html?
how my_tag
implemented? html/tag file or in code fasttag?
if my_tag defined in html/tag file general guidance don't want set lot of logic in them. maybe improve testing/validating source of value1 , value2 , making sure my_tag never gets bad value1 or value2 (assuming have pretty tight command of using my_tag.
if my_tag implemented in code fasttag, code can complex want. in case, want write tests exercise execution paths in fasttag logic. having test page of:
#{my_tag param1:badvalue1, param2:value2 } #{my_tag param1:value1, param2:badvalue2 } #{my_tag param1:badvalue1, param2:badvalue2 } #{my_tag param1:value1, param2:value2 } ....
to test many happy , sad paths my_tag can.
playframework functional-testing
Comments
Post a Comment