0

For instance, I have created a WebDriver boilerplate that I use across multiple projects and multiple workstations on the same project, however as I treat it as a library so I don't commit it to the project(s) repo. For instance

I have "Project X" running on my desktop, laptop and work computer and I update my boilerplate code on my laptop and commit the changes to the boilerplate repo, and then make some modifications to the Project X test cases and commit those. Later when I pull from the Project X repo to my Laptop, I make some code changes and run my WebDriver tests which can take about 5-10 minutes. After say 10 minutes I realise the tests have all run and some have failed because I forgot to update the library.

Some manual ways of dealing with this might be to have a library version number which is also referenced in the test cases code, however this is also a manual step that could be forgotten.

At the moment I'm leaning towards the library providing a function to generate a hash of itself which the test case code will then need to run first and if the hash mismatches then I know instantly that my test cases should be using a newer library.

What methods are common in this scenario?

DanH
  • 5,498
  • 4
  • 49
  • 72

1 Answers1

1

Have you considered using the version control commit sha? Git also has a way of dealing with submodules http://git-scm.com/book/en/v2/Git-Tools-Submodules.

Usually languages have a dependency management tool, for Python i believe it's Pip, and usually those tools have a way to lock versions and update with one command. See Install specific git commit with pip.

Community
  • 1
  • 1
AJcodez
  • 31,780
  • 20
  • 84
  • 118
  • Thanks for mentioning the commit sha, got me thinking, ended up going with the most recent git tag using `git describe --tags` – DanH Dec 23 '14 at 09:53