<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 8/16/2022 2:01 PM, Luciano Notarfrancesco via Cuis-dev wrote:
    <blockquote
cite="mid:CAL5GDyozCqPK0AnVb-udPzeY9iUih5S9aN9kg7JhSGF+F4Yifw@mail.gmail.com"
      type="cite">
      <div dir="auto">Hi Juan,</div>
      <div dir="auto"><br>
      </div>
      <div>On Tue, 16 Aug 2022 at 20:16 Juan Vuletich <<a
          moz-do-not-send="true" href="mailto:juan@cuis.st">juan@cuis.st</a>>
        wrote:<br>
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin: 0px 0px 0px
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;" dir="auto">Besides, any test I <br>
            write is repeatable, setting Random seeds as needed. I guess
            you must <br>
            have your reasons to do otherwise...</blockquote>
          <div dir="auto"><br>
          </div>
          <div dir="auto">You set a fixed seed in the test method
            itself? In that case you run the exact same test every time.
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    Yes. I always thought it is best to make tests deterministic. A
    tests that sometimes passes and sometimes fails sounds like a
    headache!<br>
    <br>
    <blockquote
cite="mid:CAL5GDyozCqPK0AnVb-udPzeY9iUih5S9aN9kg7JhSGF+F4Yifw@mail.gmail.com"
      type="cite">
      <div>
        <div class="gmail_quote">
          <div dir="auto">But what I do is set a ‘seed’ instance
            variable to a randomly generated value in initialize, and in
            setUp I set a ‘random’ instance variable to ‘Random seed:
            seed’. This is essentially what Leandro implemented in Bee
            (he added a ‘seed’ instance variable to TestCase). In this
            way, test methods can use ‘random’ freely and all is
            reproducible, but the seed is not fixed (if I create a new
            test suite or press the refresh button on the test runner
            new seeds are used, and on the long run a much larger space
            is covered in the tests).</div>
          <div dir="auto"><br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    I see. You need to be careful when a test fails. Perhaps it would be
    best to also include a list of seeds to always be included, and when
    a test fails, you add that seed to the list. This way, it is still
    useful as a regression test (as deterministic tests are).<br>
    <br>
    Cheers,<br>
    <pre class="moz-signature" cols="72">-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich</pre>
  </body>
</html>