It is random, but the list of files to test is selected from three groups in this preference order:
Files that have never been tested
If more samples need testing (depending on settings), then select from files that have been tested before, with preference towards ones that have been tested less
If still more samples are needed to test, then choose from files that have been tested the most.