Home > SQL Developer: Unit Testing > Unit Test Repository
The unit test repository is a set of tables, views, indexes, and other schema objects that SQL Developer maintains to manage the use of the unit testing feature. (Most of these objects have UT_
in their names.) You can create a separate database user for a repository or use the schema of an existing database user; but for simplicity and convenience in an environment with a single main shared repository, you may want to create a separate database user (as is done in Example of Unit Testing (Tutorial)).
A repository can be unshared or shared, depending on how many and which database users are allowed to perform various types of unit testing operations:
In an unshared repository, only the database user that owns the unit test repository schema objects can be used for operations than can modify the repository.
There can be multiple unshared repositories, for example, to allow individual developers to create private repositories.
In a shared repository, the owner of the repository objects and any other user that has been granted Administrator access to the repository (specifically, UT_REPO_ADMINISTRATOR role) can perform administrative operations, such as managing users.
There can be at most one shared repository, and this is the typical case for a team development environment. A repository administrator can add users (as explained in Managing Repository Users and Administrators) and can switch the repository status between shared and unshared. (When a repository is made shared, SQL Developer creates public synonyms for the appropriate repository objects.)
To change an unshared repository to shared, click Tools, then Unit Test, then Repository, then Select As Shared Repository. To change a shared repository to unshared, click Tools, then Unit Test, then Repository, then Deselect As Shared Repository.
Related Topics
Managing Repository Users and Administrators
To create and run unit tests and suites, you must use a connection for a database user that has been granted User access to the repository (specifically, UT_REPO_USER role). To perform repository administrative operations, such as managing users, you must use a connection for a database user that has been granted Administrator access to the repository (specifically, UT_REPO_ADMINISTRATOR role).
For example, you may want to allow users SCOTT, JONES, and SMITH to use the unit test capabilities and thus have User access to the shared repository, but to allow only SYS and the user that owns the repository objects (such as UNIT_TEST_REPOS in Example of Unit Testing (Tutorial)) to have Administrator access to the shared repository.
To grant either type of access to any database users, click Tools, then Unit Test, then Repository, then Manage Users. Select the database connection for the owner of the repository objects or for any other user that has been granted Administrator access to the repository. The Unit Testing: Manage Users dialog box is displayed.