Skip to content

Proposal For Testing Grab

MatthewHambley edited this page Nov 28, 2022 · 1 revision

The problem is testing against a repository (Subversion, Git or anything else). We could use any repository but tests should be self contained and limit opportunities for unexpected variation.

A small bespoke repository with only test data in it solves this problem but introduces another: how to manage that test artefact.

Speaking from experience you can check a VCS repository into a VCS repository but it's a bit of a mind bender. A better solution I have used is to tar up the repository and store that under version control. A preparatory step is then needed prior to testing where the test repository is extracted.

Graphically this may be represented thus: (Sequence diagram seemed most appropriate of Mermaid options)

sequenceDiagram

participant System Test
participant Working Copy
participant Test Repository

activate System Test
activate Working Copy

System Test ->> Working Copy: Extract test repository
activate Working Copy
Working Copy -) Test Repository: Create
activate Test Repository
Working Copy -->> System Test: 
deactivate Working Copy

System Test ->> Test Repository: Grab something
activate Test Repository
Test Repository -->> System Test: Thing grabbed
deactivate Test Repository

System Test -X Test Repository: Clean up
deactivate Test Repository

deactivate Working Copy
deactivate System Test
Loading
Clone this wiki locally