My question in brief: I have a set of high school schedules and transcripts and I want to run numerous checks for possible errors; I'd like to use testing tools to take advantage of their features, and for practice. Can I apply existing testing tools to the problem of checking my actual data for problems?
Context: I'm a high school teacher learning Ruby by building simple utilities to use in my work, going through online resources, etc. I've been learning about writing tests using rspec.
What I'm trying to do: The tool I'm trying to build now is intended to take input of highschool transcripts and schedules and check them all for a whole list of possible errors. This idea of checking for a whole list of things struck me as similar to automatically running a whole list of tests.
What I need: I could implement each "check"/"test" I want to run on my data as it's own method and run the script manually, but I wondered if there were established practices for this kind of problem, and whether testing tools can be used for it. I'm also hoping to be able to apply existing testing tools so that I can practice using them, and avoid building things that already exist.
My searches for variations of "Ruby test data", "validate data", "check data" are all hopelessly lacking needed specifics. Ultimately, I want it to be easy to write additional "tests" and have them run automatically; here are some examples of checks I want to include:
- Given all the schedules for every student, check all of them include at least one gym class
- Every student has a math course
- Every student has a class for every period of every day
- All students in course x are also in course y Similarly, for transcripts:
- All students with course x also have course y,
- No student is scheduled for any version of a course already on their transcript
I understand how I could read all the data into ruby and write methods to check for each of these things, if that is what I should be doing. Testing tools have features such as: * a clear syntax for writing tests, * a CLI, * ability to run automatically and get information about failures
What approach, or specific tool, should I use to solve the problem of checking my data for a whole list of errors where the list can be easily updated and extended?
Aucun commentaire:
Enregistrer un commentaire