Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/tests/cmdline/tree_conflict_tests.txt view on Meta::CPAN
-*- text -*-
TREE CONFLICT TESTING STRATEGY
This document describes how we are testing the code that detects,
reports and resolves tree conflicts. We'd like to make the testing,
and the tree conflicts feature itself, more transparent and open to
contributions.
For tree conflicts, there already exist cmdline tests for the update,
switch, merge, commit, status, info and revert commands. We've added
tree_conflicts_tests.py, not to replace the other tests, but rather to
complement them by offering a generic way to create lots of
tree-conflict detection test scenarios. The generic framework is not
yet finished, but we think it will be useful as we extend the
tree-conflict feature beyond its original use cases.
================
The Declarations
================
The new tree-conflict testing framework offers a compact, declarative
format for test definitions. Elementary actions are combined into
scenarios, scenarios are bundled into sets, and the sets are fed into
a generic tree-conflict-maker. A scenario can be committed to the
test repository and then applied to the working copy by an update,
switch or merge operation. In another test, the same scenario can
modify the working copy prior to an update or switch operation.
An advantage of this abstraction is that it allows us to create
additional tests easily through code reuse. It also helps us to see
beyond our 6 original use cases.
A disadvantage is that test failures are rather opaque, but that could
probably be fixed with some Python wizardry.
The changes that can cause tree conflicts are composed from a set of
elementary actions, each named according to its function. For
instance, fD signifies running 'svn delete' on a file.
The first character of an action name specifies the type of the item
acted upon. The names of the items are fixed.
f_ Item is the file 'F'
d_ Item is the directory 'D'
The second character of an action name can specify an svn operation.
_P - Change a Property.
(Note: Presently just sets a particular property value, even
if that property already had that value.)
_A - Create the item by Adding an unversioned item
(and set a property on it as well).
(Suggestion: Don't set a property here; let the user do so
explicitly with '_P' when desired. We'd have to ensure that
a subsequent '_P' later in the same test would still cause
a change; presently it would not.)
_C - Create the item by Copying from an existing one.
_M - Move the item to a different name.
_D - Delete the item.
Alternately, the second character can specify a non-svn filesystem
operation.
_t Append text to the file.
( run in 0.716 second using v1.01-cache-2.11-cpan-39bf76dae61 )