Note that there are some explanatory texts on larger screens.

plurals
  1. POTest strategy advice - need to record verified results of running a method and use them for testing purposes
    primarykey
    data
    text
    <p>I'm new to testing and I need an advice for the best testing strategy (and its application). Here's my problem:</p> <p>I have a program that reads a file and automatically extracts its structure. I want to test the method that makes this "intelligent" extraction. Initially I can use a few files to check if the method is doing the correct extraction. Then I want to use these files and the (correct) extraction results for testing purposes. As the extraction results have been verified they should (and must) be used for further tests. </p> <p>So, I have something like: <em>for "this particular file" I expect "this result".</em></p> <p>The problems:</p> <ol> <li><p>It's easy to get the input files for the test. I will store them in a specific directory. What about the results? They affect the contents of the object that stores the file structure. In this case I may need to save this object in a file as well. With serialization I'm afraid that with object's structure changes, it will be difficult to reuse the previous saved objects. </p></li> <li><p>With more and more results I may have hundreds of files and results and the test will take a lot of time. I expect that testing time will not be a big issue.</p></li> </ol> <p>I need testing because my "extraction algorithm" used in the method will change often. I can't cope with all possibilities in order to have a perfect extraction algorithm. So, my solution is to build an initial algorithm that works in a dozen files and each time that I find a failure in the algorithm for a particular file I change the algorithm in order to solve the problem with that file. This change should be tested in order the previous files and results are still valid.</p> <p>Any suggestion for the testing strategy?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload