Class TestUserFactory


  • @Deprecated
    public class TestUserFactory
    extends Object
    Deprecated.
    Please use confluence-test-utils module instead. See {com.atlassian.confluence.test.usermanagement.TestUserFactory} alternative
    Since:
    5.6
    • Method Detail

      • createTestUser

        public User createTestUser()
        Deprecated.
        Create a new user on the server with a generated (and hopefully unique) name. The username will be of the form testuser-COUNT-RANDOM where COUNT is numbered sequentially from 1, and RANDOM is a pseudo-randomly generated for each test. The COUNT is reset at the start of each test. If this method is invoked multiple from the same test, then COUNT will be incremented by one each time, but RANDOM will stay the same. This gives a pattern that looks like test1, test2, test3 etc, whilst still ensuring uniqueness the avoid clashes between tests not performing teardown 100% reliably.
      • generateTestUser

        public User generateTestUser()
        Deprecated.
        Generate a User object with a generated (and hopefully unique) username. This will not create the user on the server. To do that, use createTestUser()