I am trying to accept manual keyboard input while running a JUnit test. However I'm getting the following error:
java.util.NoSuchElementException: No line found
The snippet I'm using is very basic:
Scanner keyboard = new Scanner( System.in ); String userInput = keyboard.nextLine();
It seems JUnit is blocking any user input. I know that normally one wouldn't want keyboard entry during a JUnit test, but I'd like to do so because of the way the environment's set up. My goal is simply to pause the test until I manually say I'm ready for it to continue.
So my question is, how can I do this?