Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to give inputes in debug console vs code while running junit with cucumber java project #1696

Open
iamgowthaman opened this issue Jun 4, 2024 · 3 comments

Comments

@iamgowthaman
Copy link

iamgowthaman commented Jun 4, 2024

I'm using java maven selenium with cucumbe project. i need to give input like otp and some other input while executing the test case. In vs code unable to give, my test is running in Debug console so how should i give there.

Getting this issue
Fail or Pass
pass
Unrecognized request: { _request: evaluate }

can someone please help me on this issue.

my sample code

`package cucumber.Options;

import io.cucumber.junit.Cucumber;
import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@io.cucumber.junit.CucumberOptions(features = "src/test/java/features/driverTesting.feature", glue = {
"stepDefinations" }, stepNotifications = true,
dryRun = false,
plugin= {"html:target/cucumber.html", "json:target/cucumber.json",
"com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:",
"rerun:target/failed_scenarios.txt"}
)
public class DriverTesting {
}`

`Feature: Browser Driver Testing

Scenario: Verify the jenkins browser
Given Verify the browser in jenkins`

` @given("Verify the browser in jenkins")
public void verifyTheBrowserInJenkins() throws InterruptedException, IOException {

	Scanner scanner = context.objectManager.getScanner();
	System.out.println("Fail or Pass");
	TestContext.txn_status = scanner.nextLine();
	System.err.println(TestContext.txn_status);

}`
Screenshot 2024-06-04 at 9 59 55 PM Screenshot 2024-06-04 at 10 00 28 PM
@iamgowthaman iamgowthaman changed the title Unable to give inputes in debug console vs code Unable to give inputes in debug console vs code running junit with cucumber java project Jun 4, 2024
@iamgowthaman iamgowthaman changed the title Unable to give inputes in debug console vs code running junit with cucumber java project Unable to give inputes in debug console vs code while running junit with cucumber java project Jun 4, 2024
@jdneo
Copy link
Member

jdneo commented Jun 5, 2024

I'm sorry, so far giving input during test execution is not supported.

Background

We forced the test to be executed in the internal console. Due to the reason that the extension leverages debugger to launch the test runner, thus needs to know the running state of the test runner. If it goes to the integrated terminal, things become out of control.

@iamgowthaman
Copy link
Author

@jdneo any possible in future to get this feature in vscode?.
When we are using Inteliji we are adding this options to give input while testing , VM Options - Help -> Edit Custom VM options -> Past this command
-Deditable.java.test.console=true

So, if we are having a options to give input it will help us to run all our cucumber with Junit/Testng Projects in vscode itself

@iamgowthaman
Copy link
Author

@jdneo Any update on this? We requesting this feature for our testing purposes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants