Loading ...
Sorry, an error occurred while loading the content.

Automated tests for system-level operations

Expand Messages
  • Mark Striebeck
    Just to share an experience with the group: Our application needs to make some system-level calls (for our CVS integration: create repositories, create users,
    Message 1 of 1 , Jan 30, 2005
    • 0 Attachment
      Just to share an experience with the group:

      Our application needs to make some system-level calls (for our CVS
      integration: create repositories, create users, ...). So far, we didn't
      have any real automated acceptance tests for this functionality because
      every run would "pollute" the server with test users, test groups, ...
      We always kicked ideas around like chroot'ing the test server so that we
      can easily reset the test environment. Or taking a snapshot of the
      system before we run any tests and restore that. But all this seemed to
      be too much effort to setup and then to maintain.

      Recently, we had a very good idea how to solve this:
      Our application layer that makes the OS calls is now dynamically
      creating a "rollback script". Every action adds its undo action to the
      script (e.g. when we create user x, we store 'userdel -r <name>' in the
      script. After the test run has finished, we just execute the script and
      everything is clean again. We also use this technique now for manual
      testing. It's a big time saver for our manual acceptance tests and QA folks.

      I'm pretty sure that we are not the first ones that came up with the
      idea, but I couldn't find a reference anywhere (otherwise we would have
      had these tests automated some time ago!) So, maybe it'll help someone else.

      MarkS
    Your message has been successfully submitted and would be delivered to recipients shortly.