Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9e42dde
New branch and updated output format
Mar 4, 2026
43c2d8f
Add initial Playwright output support
FredRaw Mar 5, 2026
444d280
Add support for Playwright.
Mar 16, 2026
e780704
Fix header handling, send body, and test initialization for Playwright
Mar 18, 2026
a345275
Fix duplicate playwright entry
Mar 19, 2026
c5842f5
Add support for Playwright
Mar 19, 2026
cbf837b
Add support for Playwright
Mar 19, 2026
2ac346d
Add support for Playwright
Mar 19, 2026
1f0563b
Rewrite of existing support for Playwright, add Playwright support fo…
Mar 20, 2026
4969fb6
Add lombok
Mar 24, 2026
a3b7898
Merge branch 'master' into testify/playwright
Mar 24, 2026
8234fc3
added possible fixes for playwright code
FredRaw Apr 13, 2026
158e195
Add Playwright library to core-tests/e2e-tests/spring/spring-rest-bb/…
Apr 23, 2026
42c8bc7
Merge branch 'master' into testify/playwright
Apr 23, 2026
e666fb6
updated release.yml to include changes from master branch
FredRaw Apr 24, 2026
b8dc0a3
re-introduced if(nody.isNotBlank()) test to avoid failure of testInAc…
FredRaw Apr 27, 2026
188b96a
BlackBoxUtils.kt: Add base location and relative path for Playwright …
May 7, 2026
cd595a8
Merge branch 'master' into testify/playwright
May 7, 2026
ce12797
All changes only made to playwright code. Will hopefully fix BB test …
May 12, 2026
b8faf64
Merge branch 'master' into testify/playwright
May 13, 2026
21290a0
Merge branch 'master' into testify/playwright
May 19, 2026
0a9d352
Merge branch 'master' into testify/playwright
arcuri82 May 21, 2026
baec931
Improve Playwright output format and refactor E2E test utils post PR …
Jun 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ object BlackBoxUtils {

private fun mvn() = if (isWindows()) "mvn.cmd" else "mvn"


private fun runNpmInstall() {
val command = listOf(npm(), "ci")

Expand Down Expand Up @@ -106,7 +105,7 @@ object BlackBoxUtils {
}
}

fun runNpmTests(folderRelativePath: String) {
fun runNpmTests(folderRelativePath: String, isPlaywright: Boolean = false) {
runNpmInstall()

val path = if(folderRelativePath.endsWith("/")){
Expand All @@ -116,8 +115,12 @@ object BlackBoxUtils {
"$folderRelativePath/"
}

val command = listOf(npm(), "test", "--", "--testPathPattern=\"$path\"")
runTestsCommand(command, JS_BASE_PATH, "NPM")
val command = if (isPlaywright) {
listOf(npm(), "run", "test:playwright", "--", path)
} else {
listOf(npm(), "test", "--", "--testPathPattern=\"$path\"")
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code here seems duplicated from runNpmTests(). if indeed this function is needed (see previous comment) than should refactor (eg a single function with possible more parameters) to avoid code duplication

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment

runTestsCommand(command, JS_BASE_PATH, if (isPlaywright) "Playwright" else "NPM")
}

fun runPythonTests(folderRelativePath: String) {
Expand Down Expand Up @@ -151,4 +154,4 @@ object BlackBoxUtils {

fun getOutputFilePrefixKotlin(outputFolderName: String) = "com.kotlin.$outputFolderName.EM"

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ abstract class SpringTestBase : GraphQLTestBase() {
fun runGeneratedTests(outputFormat: OutputFormat, outputFolderName: String){

when{
outputFormat.isPlaywright() -> BlackBoxUtils.runNpmTests(BlackBoxUtils.relativePath(outputFolderName), true)
outputFormat.isJavaScript() -> BlackBoxUtils.runNpmTests(BlackBoxUtils.relativePath(outputFolderName))
outputFormat.isPython() -> BlackBoxUtils.runPythonTests(BlackBoxUtils.relativePath(outputFolderName))
else -> throw IllegalArgumentException("Not supported output type $outputFormat")
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
"author": "EvoMaster Team",
"license": "LGPL-3.0-only",
"devDependencies": {
"@playwright/test": "^1.59.1",
"jest": "29.7.0",
"superagent": "9.0.2",
"supertest": "7.0.0",
"urijs": "1.19.6"
},
"scripts": {
"test": "jest"
"test": "jest",
"test:playwright": "playwright test"
},
"jest": {
"testEnvironment": "node",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const { defineConfig } = require('@playwright/test');

module.exports = defineConfig({
testDir: './generated',
testMatch: /.*[tT]est\.js/,
});
2 changes: 1 addition & 1 deletion core-tests/e2e-tests/spring/spring-rest-bb/maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-->
<parent>
<groupId>org.evomaster</groupId>
<artifactId>evomaster-e2e-tests</artifactId>
<artifactId>evomaster-e2e-tests-spring</artifactId>
<!-- WARNING: the marker is used in the version.py script -->
<version>6.0.1-SNAPSHOT</version><!--MARKER-->
<relativePath>../../pom.xml</relativePath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ abstract class SpringTestBase : RestTestBase() {
}
}


fun runBlackBoxEM(
outputFormat: OutputFormat,
outputFolderName: String,
Expand All @@ -172,6 +171,7 @@ abstract class SpringTestBase : RestTestBase() {
fun runGeneratedTests(outputFormat: OutputFormat, outputFolderName: String){

when{
outputFormat.isPlaywright() -> BlackBoxUtils.runNpmTests(BlackBoxUtils.relativePath(outputFolderName), true)
outputFormat.isJavaScript() -> BlackBoxUtils.runNpmTests(BlackBoxUtils.relativePath(outputFolderName))
outputFormat.isPython() -> BlackBoxUtils.runPythonTests(BlackBoxUtils.relativePath(outputFolderName))
outputFormat.isJava() -> BlackBoxUtils.runJavaTests(outputFolderName)
Expand Down Expand Up @@ -230,4 +230,4 @@ abstract class SpringTestBase : RestTestBase() {
}
}

}
}
1 change: 1 addition & 0 deletions core-tests/e2e-tests/spring/spring-rest-rsa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>

</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ enum class OutputFormat {
KOTLIN_JUNIT_4,
KOTLIN_JUNIT_5,
JS_JEST,
JS_JEST_PLAYWRIGHT,
//CSHARP_XUNIT, //no longer supported, but there is still legacy code not removed
PYTHON_UNITTEST
;
Expand All @@ -28,6 +29,8 @@ enum class OutputFormat {

fun isJavaScript() = this.name.startsWith("js_", true)

fun isPlaywright() = this.name.endsWith("_playwright", true)

fun isJavaOrKotlin() = isJava() || isKotlin()

fun isJUnit5() = this.name.endsWith("junit_5", true)
Expand All @@ -41,4 +44,6 @@ enum class OutputFormat {

fun isPython() = this.name.startsWith("python_", true)

fun isJsBased() = isJavaScript() || isPlaywright()
// Helper method for JavaScript based formats. Playwright is currently only supported for JavaScript (or TypeScript) //
}
Loading