Skip to main content

Libraries

Functions can be placed into libraries.

If a function can be used in more than one package it can be placed in a library. The library is executed as part of each package that uses the library. There are the same global objects available, and every log from the library is written to the log output of the using package. There is no log of a library for its own.

Remember:

  • A Library is a package that can be used from multiple other packages, but not be executed for itself.
  • Libraries can be used by any standard or test package - but not by other libraries.
  • Libraries write log entries to the log of the calling package.
  • To create a library choose the Library package type.

With libraries it is easy to organize the code. Every function that can be used from more than one package should be in a library.

Different kinds of libraries

There are different kinds of libraries:

  • Environment Library
  • Standard Library
  • Test Library

Environment Libraries are used to define generell settings for automations across multiple packages.

Standard Libraries are used to define functions that are used in more than one package.

Test Libraries are used for testing, in most cases to have a dedicated place to define test data.