• 范飞扬
    2024-04-23 来自广东
    同学问:自己设计Q1的测试用例,有典型用法、边界值、对象状态、耗时性能、并发情况、误用情况、反复调用等方面的考虑,这些在目前的示例里没体现,是否有必要考虑,在哪个步骤做合适? === 我理解,这个问题其实是,How many tests should you write? 这是个好问题。 我之前有个 Kent Beck 的《TDD by example》的读书笔记,可以回答这个问题: How many tests should you write? For simple problem of triangle, Kent wrote six tests, Bob Binder wrote 65. Think about MTBF, if you want the MTBF to be 10 years, you should write more tests. (下面是原文了) TDD’s view of testing is pragmatic. In TDD, the tests are a means to have great confidence. If our knowledge of the implementation gives us confidence even without a test, then we will not write that test. Black box testing demonstrates adifferent value system. It’s an appropriate attitude to take in some circumstances, but that is different from TDD. 总结一下就是:“看情况”。测与不测,黑盒白盒,覆盖范围,都看情况。 怎么看情况? 如果很有 confidence,那就不测了。如果有 fear,那可以测测,就像 Kent Beck 说的:“Write tests until fear is transformed into boredom.” 这里 boredom 也可以理解成 Confidence
    展开
    
    1
  • 术子米德
    2024-04-23 来自浙江
    🤔☕️🤔☕️🤔 【R】Prompt4Q1: 架构描述:技术栈、架构风格、规则和示例; 功能需求:$FuncLists; 任务-Step1:描述目标组件、目标功能、测试场景描述、测试数据准备; 任务-Step2:根据指定技术栈,为目标场景提供测试代码; 【Q】最终的Clear是任务-Step2,这个步骤里,执行清晰明确的任务步骤即可,这之前的任务-Step1是Complicated,这个步骤里,要根据架构描述和功能需求,分析做出选择,并生成下一步的清晰任务列表,如此理解合理吗? 【Q】自己设计Q1的测试用例,有典型用法、边界值、对象状态、耗时性能、并发情况、误用情况、反复调用等方面的考虑,这些在目前的示例里没体现,是否有必要考虑,在哪个步骤做合适? — by 术子米德@2024年4月22日
    共 2 条评论
    
  • 范飞扬
    2024-04-22 来自广东
    代词消除真是妙, 1、感觉架构可以通过 mermaid class diagram 加上 半结构化自然语言 来表达吧,这样更凝炼一点? 2、功能需求也可以用验收测试或者用户故事表达
    
    