当我创建新的游轮时。 我是否需要对此进行测试(假设我们使用TDD?)? 如何进行检验,以及从总体上对各方进行检验的最佳做法是什么?
例如,有一部法典,我使用我的标签“米-标签”:
#{my_tag param1:value1, param2:value2 }
如果想一谈一点,那只是一个介绍点,就会在一页上做些什么。 那么,我们应当检验它如何处理参数,如何使之达到html?
当我创建新的游轮时。 我是否需要对此进行测试(假设我们使用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 }
....
检验你们能为我的主人所走的非常愉快和悲惨的道路。
I have a model called "Post" which is a nested resource under a model called "Project" and I m trying to test the controller. The code works find in my browser, but I can t get it to work in the test....
I m working on a test plan for a website where some tests are taking the following path: Hit the requested URI and get the data rendered inside some table(20 rows per page). Make a database query to ...
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 ...
A long time ago, I had to test a program generating a postscript file image. One quick way to figure out if the program was producing the correct, expected output was to do an md5 of the result to ...
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 ...
I have the following filter defined: # application_controller.rb class ApplicationController < ActionController::Base before_filter :find_account private def find_account @...
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 "...
I m writing tests that check that an external service is providing inventory data (on their test server) that I can check out with, and also cancel. This testing is in the travel/hotel world, and I ...