44 Matching Annotations
  1. Last 7 days
    1. This class of bug is insidious because it evades every layer of defense. It will not be caught in development testing — who runs a test for 50 days? It will not be flagged in code review — the logic looks perfectly reasonable.

      大多数人认为代码审查和测试能捕获大多数系统性缺陷,但作者认为这个bug的特殊性使其能够逃避所有常规检测手段。这挑战了软件质量保证的基本假设,暗示某些缺陷只有在极端条件下才会显现,而常规开发流程无法覆盖这些场景。

  2. Aug 2024
  3. May 2024
  4. Dec 2023
  5. Nov 2022
  6. Jun 2022
  7. Mar 2022
    1. A test case is a series of actions that are performed to determine a specific function or functionality of your application. Test scenarios are rather vague and include a wide range of variables. However, testing is all about being very specific. That is why we need elaborate test cases.

      Test cases, examples and Best Practices A test case is a series of actions that are performed to determine a specific function or functionality of your application. Test scenarios are rather vague and include a wide range of variables. However, testing is all about being very specific. That is why we need elaborate test cases.

  8. Feb 2022
  9. Nov 2021
  10. Sep 2021
  11. Jun 2021
  12. Mar 2021
  13. Feb 2021
  14. Nov 2020
  15. Oct 2020
  16. Jun 2020
  17. May 2020
  18. Apr 2020
  19. Feb 2020
  20. Nov 2019
    1. You want to write maintainable tests for your React components. As a part of this goal, you want your tests to avoid including implementation details of your components and rather focus on making your tests give you the confidence for which they are intended. As part of this, you want your testbase to be maintainable in the long run so refactors of your components (changes to implementation but not functionality) don't break your tests and slow you and your team down.
  21. Nov 2018
    1. Something that I've found helps greatly with testing is that when you have code with lots of nested function calls you should try to refactor it into a flat, top level pipeline rather than a calling each function from inside its parent function. Luckily in clojure this is really easy to do with macros like -> and friends, and once you start embracing this approach you can enter a whole new world of transducers. What I mean by a top level pipeline is that for example instead of writing code like this: (defn remap-keys [data] ...some logic...) (defn process-data [data] (remap-keys (flatten data))) (defn get-data [] (let [data (http/get *url*)] (process-data data))) you should make each step its own pure function which receives and returns data, and join them all together at the top with a threading macro: (defn fetch-data [url] (http/get url)) (defn process-data [data] (flatten data)) (defn remap-keys [data] ...some logic...) (defn get-data [] (-> *url* fetch-data process-data remap-keys)) You code hasn't really changed, but now each function can be tested completely independently of the others, because each one is a pure data transform with no internal calls to any of your other functions. You can use the repl to run each step one at a time and in doing so also capture some mock data to use for your tests! Additionally you could make an e2e tests pipeline which runs the same code as get-data but just starts with a different URL, however I would not advise doing this in most cases, and prefer to pass it as a parameter (or at least dynamic var) when feasible.

      testing flat no deep call stacks, use pipelines

  22. Nov 2016