lundi 29 janvier 2018

How to pass User Interaction in Cucumber CLI test

I have a delete script that deletes data and while doing so prompts to ask for proceed. I want to pass both my command and the user interaction "Y" in cucumber-cli

Scenario: Delete customer should delete all data Given the input When running the command """ abc delete """ Then the job should finish without throwing an error

I have tried echo Y | abc delete abc delete <<< Y printf Y | abc delete

But none seems to work inside scala-cucumber. It works only on terminal. What could be the problem?

That's my O/p

Press 'Y' to continue... Exception in thread "main" java.io.EOFException: Console has reached end of input at scala.io.StdIn$class.readChar(StdIn.scala:93) at scala.io.StdIn$.readChar(StdIn.scala:229)

Aucun commentaire:

Enregistrer un commentaire