I'm about to embark on developing a fairly sophisticated suite of tests in Java, and I'm reaching out via Stack Overflow for suggestions on best practices or approaches.
The type of testing I'm going to be performing is on an XML document that users upload. However, this is not a validation against an XSD schema definition, but rather on the content of the XML itself. For example, if the XML document looks like this:
<Students>
<Student name="Larry" />
<Student name="Curly" />
<Student name="Moe" />
<Student name="Curly" />
</Students>
We may have to develop a test that states: "Ensure no two students have the same name" and develop a subsequent method: ensureStudentsDontHaveSameName(), in which case the above example will fail that particular test. There may be hundreds or thousands of tests that we will need to develop against this xml document.
I'm very familiar with Unit testing and JUnit, and although I feel this would be a good candidate for unit testing, these tests run as part of the app and we can't use a separate JUnit test runner to run the test and get the results.
I'm looking into creating an interface with a list of all the tests and developing an implementation class for that interface with the actual tests in it. We will then have to maintain the results of the test and generate reports for it.
Hopefully this question is relevant for this community and I can get feedback from others that have approached something like this as well. Thanks!
Aucun commentaire:
Enregistrer un commentaire