Unit Testing implementation of Turbo Activate

Hello!

We are using Lime LM and Turbo Activate to license our software, and we would like to run Unit Tests of our usage of Turbo Activate not only to validate it is done correctly, but most importantly to ensure it doesn't get broken by future changes.

However, the nature of licensing is so that it leaves a mark and the system will never be exactly the same in subsequent runs. This is very bad for unit tests: it is mandatory for the test to function properly to be able to revert the system to a previous state, which goes in direct contradiction with the principle of licensing a machine to run the software.

Additionally, there doesn't seem to be any method in the API to query the actual state of the licensing: all the services (at the exception of TA_IsActivated maybe) seem to perform operations on the machine, which makes testing difficult.

Unit testing is a very common practice in programming, and you probably do it yourself internally. Is there a way to go about this? Is there a method call to wipe clean a machine from LimeLM fingerprint and local data?

Thank you for your help

Hey Nicolas,

The best way to test a "clean slate" of a computer is to use a fully-updated virtual machine, make a snapshot of it, then run whatever tests you need to run. Then, when you need to re-run tests, you can certainly do that by going back to that snapshot and re-running the tests.

Some data can be "cleaned completely", for example the activation and product key data can be removed completely using TA_Deactivate(your_handle, 1);

Some data cannot be "cleaned completely" (for example, verified trial data, while the files can be removed, that doesn't actually re-set the trial because the fingerprint of that computer is stored on the activation servers and when you "restart" the trial on the snapshot you'll resume where you left off on the trial).

To be clearer, I'm asking whether you offer/allow mocking of your infrastructure for testing purposes. That's essentially the standard business practice to test these systems.

Wyatt wrote:> Hey Nicolas,> > The best way to test a "clean slate" of a computer is to use a> fully-updated virtual machine, make a snapshot of it, then run whatever> tests you need to run. Then, when you need to re-run tests, you can> certainly do that by going back to that snapshot and re-running the tests.> > Some data can be "cleaned completely", for example the activation> and product key data can be removed completely using> TA_Deactivate(your_handle, 1);> > Some data cannot be "cleaned completely" (for example, verified> trial data, while the files can be removed, that doesn't actually re-set> the trial because the fingerprint of that computer is stored on the> activation servers and when you "restart" the trial on the> snapshot you'll resume where you left off on the trial).

Thank you for the quick answer.