Class ThreadContext

java.lang.Object
ru.testit.services.ThreadContext

public class ThreadContext extends Object
Storage that stores information about not finished tests and steps.
  • Constructor Details

    • ThreadContext

      public ThreadContext()
  • Method Details

    • getCurrent

      public Optional<String> getCurrent()
      Returns last (most recent) uuid.
      Returns:
      last uuid.
    • getRoot

      public Optional<String> getRoot()
      Returns first (oldest) uuid.
      Returns:
      first uuid.
    • start

      public void start(String uuid)
      Adds new uuid.
      Parameters:
      uuid - the value
    • stop

      public Optional<String> stop()
      Removes latest added uuid. Ignores empty context.
      Returns:
      removed uuid.
    • clear

      public void clear()
      Removes all the data stored for current thread.