XMLParser's XML-Tests-Conformance project, which is automatically generated from the W3C's Conformance Test Suites project (https://www.w3.org/XML/Test/), stores the contents of its files in class methods. This way it's self-contained, portable, and the actual files only need to be downloaded and unzipped to regenerate the TestCases. Consider extracting it into a separate project with a separate CI job if it gets too big.
Sent: Saturday, April 15, 2017 at 12:52 PM From: "Peter Uhnak" <i.uhnak@gmail.com> To: pharo-users@lists.pharo.org Subject: [Pharo-users] best practices for using external files for testing
Hi,
is there a common/best practice for using external files in tests?
In my specific case I am interested in git-based projects, where I have a big (~1MB) file stored in repository and I would like to use it in my tests.
For GitFileTree project I could presumably use the following to access it:
'OP-XMI' asPackage mcPackage workingCopy repositoryGroup remotes first directory / 'tests' / 'my-test-file.xmi'
This will retrieve the MCPackage of the Package and then retireve where it the repo is actually stored on the disk.
Are there better ways to do this? Could something similar be done with IceBerg?
(p.s. in theory I could compile the entire file (e.g. 1MB) to a method, but that is very ugly to me)
Thanks, Peter