Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 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
4443584
Merge branch 'master' into testify/playwright
Jun 15, 2026
65cc4b6
Merge master, fix JS_JEST certificate failures and isolate naming sid…
Jun 19, 2026
171981e
Merge branch 'master' into testify/playwright
Jun 22, 2026
6ae9d66
Merge master and fix failing BB Playwright tests by using request opt…
Jun 22, 2026
ef30fb6
Merge branch 'master' into testify/playwright
Jun 23, 2026
fc4a3ce
- Rename OutputFormat JS_JEST_PLAYWRIGHT to JS_PLAYWRIGHT; streamline…
Jul 6, 2026
f492940
Merge branch 'master' into testify/playwright
Jul 6, 2026
4b9016c
Merge branch 'master' into testify/playwright
Jul 8, 2026
1becef8
Isolate auth/request generation for Playwright:
Jul 9, 2026
7a511e8
Merge branch 'master' into testify/playwright
Jul 9, 2026
24873df
Adjust request/body and suite scaffolding, update options.md and merg…
Jul 9, 2026
5da0f4a
Remove commented out code and unnecessary isJavaScript condition.
Jul 10, 2026
21398a1
Merge branch 'master' into testify/playwright
Jul 10, 2026
77c238a
Merge branch 'master' into testify/playwright
Jul 11, 2026
39868da
Merge branch 'master' into testify/playwright
Jul 31, 2026
1291cd2
Streamline Playwright handling and header setup across writers:
Aug 19, 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\"")
}
Comment thread
arcuri82 marked this conversation as resolved.
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,7 +100,12 @@ abstract class SpringTestBase : GraphQLTestBase() {
fun runGeneratedTests(outputFormat: OutputFormat, outputFolderName: String){

when{
outputFormat.isJavaScript() -> BlackBoxUtils.runNpmTests(BlackBoxUtils.relativePath(outputFolderName))
outputFormat.isJavaScript() ->
if (outputFormat.isPlaywright()) {
BlackBoxUtils.runNpmTests(BlackBoxUtils.relativePath(outputFolderName), true)
} else {
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,16 +6,19 @@
"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",
"testRegex": "generated/.*/.*[tT]est\\.js$"
"testRegex": "generated/.*/.*[tT]est\\.js$",
"testPathIgnorePatterns": [".*_pw\\.js$"]
}
}
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.1.2-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,7 +171,7 @@ abstract class SpringTestBase : RestTestBase() {
fun runGeneratedTests(outputFormat: OutputFormat, outputFolderName: String){

when{
outputFormat.isJavaScript() -> BlackBoxUtils.runNpmTests(BlackBoxUtils.relativePath(outputFolderName))
outputFormat.isJavaScript() -> BlackBoxUtils.runNpmTests(BlackBoxUtils.relativePath(outputFolderName), outputFormat.isPlaywright())
outputFormat.isPython() -> BlackBoxUtils.runPythonTests(BlackBoxUtils.relativePath(outputFolderName))
outputFormat.isJava() -> BlackBoxUtils.runJavaTests(outputFolderName)
outputFormat.isKotlin() -> BlackBoxUtils.runKotlinTests(outputFolderName)
Expand Down Expand Up @@ -218,6 +217,9 @@ abstract class SpringTestBase : RestTestBase() {
if(outputFormat.isKotlin()){
setOption(args,"outputFilePrefix",BlackBoxUtils.getOutputFilePrefixKotlin(outputFolderName))
}
if (outputFormat.isPlaywright()) {
setOption(args, "outputFilePrefix", "EvoMaster_pw")
}

defaultSeed++
lambda.accept(ArrayList(args))
Expand All @@ -230,4 +232,4 @@ abstract class SpringTestBase : RestTestBase() {
}
}

}
}
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_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 @@ -40,5 +43,4 @@ enum class OutputFormat {
fun isCsharp() = this.name.startsWith("csharp",ignoreCase = true)

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

}
Loading
Loading