Skip to content

Test Method

David edited this page Feb 27, 2023 · 4 revisions

To test this in an automated way, we don't have access to large quantities or real user statements, or a reasonable way to independently compare the statements to check the process against. So, we will simulate it with a numerical proxy.

There are two levels of testing that we need:

  1. Unit testing for the APIs that the client will call
  2. Sanity test of the idea - does the tournament style grouping and ranking by humans yield a result that is comparable (good enough) to what you would get if the humans grouped and ranked all the items.

To make testing possible, we will use numbers as statements. To simulate humans, we will create different functional actors to represent them.

Where numbers are used below, we should used globally defined constants that we can easily change.

Each actor will generate random numbers as statements. For now lets say between 1 and 100. Each actor will group and rank statements (numbers) using slightly different methods

  1. Group statements (numbers) if within 1.
    1.1 Withing the group choose the smallest as representative
    1.2 Rank the smallest 2 as most important
  2. If statements are within 2.
    2.1 Within the group choose the most largest as representative
    2.2 Rank the largest 2 as most important
  3. Will never group statements.
    3.1 Will randomly choose 2 to rank as most important.
  4. We may define other actor types as we go, or change these.

When generating test data for the previous W-1 participants, the actors will have different frequencies of occurrence.

The tests will be written in Jest. The tests will use the APIs to create the statements and interact with them. The statements will be a number encoded as a string.

A test will implement clustering, looking at the entire data set (something that no human would do, or live long enough in some cases) - and compare the result to the simulated human clustering.

Clone this wiki locally