English 中文(简体)
如何测试游戏机体,我需要做的是
原标题:how to test playframework s tag and do I need do that

当我创建新的游轮时。 我是否需要对此进行测试(假设我们使用TDD?)? 如何进行检验,以及从总体上对各方进行检验的最佳做法是什么?

例如,有一部法典,我使用我的标签“米-标签”:

#{my_tag param1:value1, param2:value2 }

如果想一谈一点,那只是一个介绍点,就会在一页上做些什么。 那么,我们应当检验它如何处理参数,如何使之达到html?

问题回答

如何实施<代码>my_tag? 作为一种“快车”的html/标签或编码?

如果在html/标签文件中界定我的标签,一般指导就是你不想在其中提出许多逻辑。 因此,也许你会更好地测试/验证价值1和价值2的来源,并确保我——主人永远不会获得坏价值1或价值2(假设你对谁使用我方的标签有严格的控制)。

如果在法典中作为“快车”执行我的标签,那么该守则可能像你想要的那样复杂。 在此情况下,你想写出在“快车”逻辑中采用所有执行途径的测试。 你可以这样做,只是有一个试验页:

#{my_tag param1:badvalue1, param2:value2 }
#{my_tag param1:value1, param2:badvalue2 }
#{my_tag param1:badvalue1, param2:badvalue2 }
#{my_tag param1:value1, param2:value2 }
....

检验你们能为我的主人所走的非常愉快和悲惨的道路。





相关问题
Functional Testing of Authorization In Rails

I know how to run functional/integration tests in Rails, this question is about best practices. Let s say authorization is performed using four distinct user roles: basic editor admin super This ...

Does it make sense to test ui components separately?

I m working on a webform that has about 15 user controls, separated by context (comments, locations, members/leaders, etc).   If each control can render individually (using real or test data), does it ...

How to fake out a subdomain lookup in Rails tests?

I have the following filter defined: # application_controller.rb class ApplicationController < ActionController::Base before_filter :find_account private def find_account @...

Is it okay to run for loops in functional test methods?

Is it okay (conceptually) to run for loops in test methods? I d like to test a range of parameter values into a controller, to determine if the different inputs return the correct values. test "...

热门标签