<div dir="ltr"><br>Hi all,<br><br>I attach this in case anyone thinks it might be useful. I don't mean to imply that Bazaar is inadequately tested<br>but I thought this might be a useful addition to its current testing. It didn't take me long to produce it and<br>
I think you could easily produce a lot more of this kind of test quite quickly<br><br>It makes use of TextTest which you can download from <a href="http://sourceforge.net/project/showfiles.php?group_id=80138">http://sourceforge.net/project/showfiles.php?group_id=80138</a><br>
Further information lives at <a href="http://www.texttest.org">http://www.texttest.org</a>. (I'm currently in the process of migrating TextTest to use <br>Bazaar and Launchpad.)<br><br>Basic instructions: install PyGTK and tkdiff, unzip the attached test suite and the TextTest download, cd to the<br>
test suite directory and run texttest.py from wherever you unzipped it. <br><br>The basic plan: it runs bazaar from the command line and compares stdout, stderr, a generated file describing all files<br>created, edited and deleted, and the bazaar log. Run-dependent entries in these are filtered away. It also runs everything <br>
on copies of the data which are then removed so you don't have to reset anything. BZR_HOME, the bazaar repository .bzr, <br>and the working tree are all test data and vary throughout the structure independently of one another. <br>
<br>I've run it on bazaar 1.3.1 and 1.5 and the tests work unchanged between those versions. But the baseline files are easy to "save"<br>as and when this is needed.<br><br>The main points:<br>1) You don't need to know the code to write tests (I've never looked at the code)<br>
2) Tests don't depend on the structure of the code and hence don't need changing when the code is refactored.<br>3) There are already quite a few blackbox tests that look like<br><br>def test_update_standalone_trivial(self):<br>
self.make_branch_and_tree('.')<br> out, err = self.run_bzr('update')<br> self.assertEqual('Tree is up to date at revision 0.\n', err)<br> self.assertEqual('', out)<br>
<br>This is basically a way to write tests of that form without writing any code.<br><br>Let me know if anyone is interested in trying this out. Am happy to provide further information if needed.<br><br>Regards,<br>Geoff Bache<br>
<br><br><br><br></div>