You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run cucmber tests as an AWS lambda function using Java. When I invoke it as
try {
String tags = (String) input.getOrDefault("tags", "@mytests");
String[] cucumberArgs = new String[]{
"--glue", "com.example", // Path to step definitions
"classpath:resources/features", // Path to feature files
"--strict",
"--tags", tags, // Tags to filter tests
};
System.out.println("Tests going to be run now");
Main.run(cucumberArgs, Thread.currentThread().getContextClassLoader());
System.out.println("Tests completed successfully");
return "Tests completed successfully.";
} catch (Throwable e) {
e.printStackTrace();
return "Error running tests: " + e.getMessage();
}
The lambda function just exists and no logs are printed in localstack container except for "Tests going to be run now". Has anyone tried this before? Is it supported?
✅ What did you expect to see?
I expected it to run the tests just line a normal command line handler would. When I tried creating a standalone jar file and using that to run the tests, it worked fine.
📦 Which tool/library version are you using?
java-17
cucumber 5.7.0
🔬 How could we reproduce it?
Take any cumber project
Add a runner extending lambda request handler with above code as the handler
package as a jar and use localstack to create a lambda
invoke the lambda to run the cucmber tests
📚 Any additional context?
No response
The text was updated successfully, but these errors were encountered:
You're running on a JVM, so it should work. So no clue.
You may well be running out of memory. I think the default on AWS was 128MiB.
So either the lambda is killed before more is logged or perhaps with the exception being swallowed nothing else is logged and the system hangs. Try with the latest version it's gotten slightly better at immediately rethrowing out of memory exceptions.
👓 What did you see?
I am trying to run cucmber tests as an AWS lambda function using Java. When I invoke it as
The lambda function just exists and no logs are printed in localstack container except for "Tests going to be run now". Has anyone tried this before? Is it supported?
✅ What did you expect to see?
I expected it to run the tests just line a normal command line handler would. When I tried creating a standalone jar file and using that to run the tests, it worked fine.
📦 Which tool/library version are you using?
java-17
cucumber 5.7.0
🔬 How could we reproduce it?
📚 Any additional context?
No response
The text was updated successfully, but these errors were encountered: