Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
8d271a6
starting preparing E2E tests
arcuri82 Dec 3, 2024
fe202e6
trying to get rid off JPA in new E2E
arcuri82 Dec 4, 2024
82e2f87
refactoring and cleaning
arcuri82 Dec 16, 2024
258a639
more refactoring
arcuri82 Dec 16, 2024
949f268
moe fixes
arcuri82 Dec 16, 2024
effb4c0
refactoring package location
arcuri82 Dec 16, 2024
506e417
more cleaning and refactoring for DbCleaner
arcuri82 Dec 16, 2024
fa9fee1
fix for failing test
arcuri82 Dec 16, 2024
5c5a4e4
more fixes related to schema in table ids
arcuri82 Dec 17, 2024
a572f05
more cleaning and fixing
arcuri82 Dec 18, 2024
5707132
add calculateStringSimilarityScoreWithTableName
man-zhang Jan 2, 2025
434bef4
fix
man-zhang Jan 2, 2025
26da911
Merge branch 'master' into sql-multidb-v3
man-zhang Jan 2, 2025
507defb
fix due to merge
man-zhang Jan 2, 2025
db7fd1f
Merge branch 'master' of https://github.com/WebFuzzing/EvoMaster into…
arcuri82 Jan 7, 2025
04d66bd
refactoring table id in dto
arcuri82 Jan 8, 2025
ba60dfc
fix for some tests
arcuri82 Jan 8, 2025
cd98db9
introducing TableId
arcuri82 Jan 8, 2025
cdb2a64
starting refactoring for TableId
arcuri82 Jan 8, 2025
ec43583
more on TableId
arcuri82 Jan 15, 2025
392023d
Merge branch 'master' of https://github.com/WebFuzzing/EvoMaster into…
arcuri82 Jan 15, 2025
dbd2e90
more refactoring
arcuri82 Jan 17, 2025
3483d4c
yet on the journey to refactor TableId
arcuri82 Jan 17, 2025
0f6c787
some more refactoring
arcuri82 Jan 20, 2025
9bfb18e
Merge branch 'master' of https://github.com/EMResearch/EvoMaster into…
arcuri82 Feb 19, 2025
f47182e
resolve issues in SimpleDeriveR2T.kt due to updates
man-zhang Feb 19, 2025
7f3673d
Merge branch 'master' of https://github.com/WebFuzzing/EvoMaster into…
arcuri82 Feb 25, 2025
379d758
working on compilation issues
arcuri82 Feb 25, 2025
d8aac63
fixed some more compilation issues
arcuri82 Feb 25, 2025
9b82cf7
Merge branch 'master' of https://github.com/WebFuzzing/EvoMaster into…
arcuri82 Mar 6, 2025
afcd01e
fixed series of broken tests
arcuri82 Mar 6, 2025
fad9982
fixed more tests
arcuri82 Mar 6, 2025
504b647
more fixes
arcuri82 Mar 6, 2025
7b29cbb
yet again more fixes
arcuri82 Mar 6, 2025
a5f9ffe
fix
man-zhang Mar 9, 2025
5e2e0a9
fix test
man-zhang Mar 9, 2025
1a013a3
fix compilation error
man-zhang Mar 9, 2025
61cac19
Merge branch 'master' of https://github.com/WebFuzzing/EvoMaster into…
arcuri82 Mar 11, 2025
ed7d74d
fixed NPE
arcuri82 Mar 11, 2025
6054ef4
fixed DI
arcuri82 Mar 11, 2025
a024d0e
more DI fixes
arcuri82 Mar 11, 2025
5b4b6f8
Merge branch 'master' into sql-multidb-v3
arcuri82 Mar 18, 2025
4883591
Merge branch 'master' into sql-multidb-v3
arcuri82 Apr 8, 2025
69849c9
Merge branch 'master' of https://github.com/WebFuzzing/EvoMaster into…
arcuri82 Aug 29, 2025
a44ed07
cleaning up
arcuri82 Aug 29, 2025
f656807
cleaning up
arcuri82 Aug 29, 2025
9939e54
more clean up
arcuri82 Aug 30, 2025
be3cad7
fixing some unit tests
arcuri82 Aug 30, 2025
184bb73
fixing for tests in sql module
arcuri82 Sep 1, 2025
2381917
fixed some compilation error
arcuri82 Sep 1, 2025
8359d25
fixed bug in handling of db reset
arcuri82 Sep 5, 2025
a648626
fixed bug after change of semantics
arcuri82 Sep 5, 2025
420a055
fix for too restrictive/brittle assertions
arcuri82 Sep 8, 2025
1840d05
tmp hack to deal with issue in resetting SQL tables
arcuri82 Sep 9, 2025
65749d2
Merge branch 'master' into sql-multidb-v3
arcuri82 Sep 22, 2025
5469ec7
Merge branch 'master' into sql-multidb-v3
arcuri82 Sep 23, 2025
0891bf2
dirty hacks to fix some of the tests, before further major refactoring
arcuri82 Sep 23, 2025
7ee5747
dirty hacks for SQL init
arcuri82 Sep 25, 2025
49b4305
dirty hacks for FK in SutController
arcuri82 Sep 29, 2025
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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,17 @@ default String getInitSqlScript() {

@Test
default void testAccessedFkClean() throws Exception {
EMSqlScriptRunner.execCommand(getConnection(), "CREATE TABLE Bar(id INT Primary Key, valueColumn INT)", true);
EMSqlScriptRunner.execCommand(getConnection(), "CREATE TABLE Foo(id INT Primary Key, valueColumn INT, refer_foo INT DEFAULT NULL, bar_id INT, " +
EMSqlScriptRunner.execCommand(getConnection(),
"CREATE TABLE Bar(id INT Primary Key, valueColumn INT)", true);
EMSqlScriptRunner.execCommand(getConnection(),
"CREATE TABLE Foo(id INT Primary Key, valueColumn INT, refer_foo INT DEFAULT NULL, bar_id INT, " +
"CONSTRAINT fk_foo FOREIGN KEY (bar_id) REFERENCES Bar(id)," +
"CONSTRAINT fk_self_foo FOREIGN KEY (refer_foo) REFERENCES Foo(id) )", true);
EMSqlScriptRunner.execCommand(getConnection(), "CREATE TABLE Abc(id INT Primary Key, valueColumn INT, foo_id INT, " +
EMSqlScriptRunner.execCommand(getConnection(),
"CREATE TABLE Abc(id INT Primary Key, valueColumn INT, foo_id INT, " +
"CONSTRAINT fk_abc FOREIGN KEY (foo_id) REFERENCES Foo(id) )", true);
EMSqlScriptRunner.execCommand(getConnection(), "CREATE TABLE Xyz(id INT Primary Key, valueColumn INT, abc_id INT, " +
EMSqlScriptRunner.execCommand(getConnection(),
"CREATE TABLE Xyz(id INT Primary Key, valueColumn INT, abc_id INT, " +
"CONSTRAINT fk_xyz FOREIGN KEY (abc_id) REFERENCES Abc(id) )", true);

InstrumentedSutStarter starter = getInstrumentedSutStarter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public SutInfoDto.OutputFormat getPreferredOutputFormat() {
@Override
public String startSut() {
running = true;
DbCleaner.clearDatabase(sqlConnection, null, DatabaseType.H2);
DbCleaner.clearDatabase_H2(sqlConnection, null, null);
return "foo";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void testBasic() throws Exception {
assertAll(() -> assertEquals("db_test", schema.name.toLowerCase()),
() -> assertEquals(DatabaseType.H2, schema.databaseType),
() -> assertEquals(1, schema.tables.size()),
() -> assertEquals("foo", schema.tables.get(0).name.toLowerCase()),
() -> assertEquals("foo", schema.tables.get(0).id.name.toLowerCase()),
() -> assertEquals(1, schema.tables.get(0).columns.size())
);
}
Expand All @@ -45,8 +45,8 @@ public void testTwoTables() throws Exception {
assertNotNull(schema);

assertEquals(2, schema.tables.size());
assertTrue(schema.tables.stream().map(t -> t.name.toLowerCase()).anyMatch(n -> n.equals("foo")));
assertTrue(schema.tables.stream().map(t -> t.name.toLowerCase()).anyMatch(n -> n.equals("bar")));
assertTrue(schema.tables.stream().map(t -> t.id.name.toLowerCase()).anyMatch(n -> n.equals("foo")));
assertTrue(schema.tables.stream().map(t -> t.id.name.toLowerCase()).anyMatch(n -> n.equals("bar")));
}


Expand Down Expand Up @@ -135,8 +135,8 @@ public void testBasicForeignKey() throws Exception {
DbInfoDto schema = DbInfoExtractor.extract(getConnection());
assertEquals(2, schema.tables.size());

TableDto bar = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Bar")).findAny().get();
TableDto foo = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto bar = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Bar")).findAny().get();
TableDto foo = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(0, bar.foreignKeys.size());
assertEquals(1, foo.foreignKeys.size());
Expand Down Expand Up @@ -184,7 +184,7 @@ public void testColumnUpperBoundConstraint() throws Exception {

assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(2, fooTable.columns.size());

Expand Down Expand Up @@ -212,7 +212,7 @@ public void testTableConstraint() throws Exception {

assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(2, fooTable.columns.size());

Expand All @@ -236,7 +236,7 @@ public void testPrimaryKey() throws Exception {

assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(1, fooTable.columns.size());

Expand All @@ -257,7 +257,7 @@ public void testEnumStringConstraint() throws Exception {

assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(2, fooTable.columns.size());

Expand All @@ -282,7 +282,7 @@ public void testEnumBooleanConstraint() throws Exception {

assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(1, fooTable.columns.size());

Expand All @@ -306,7 +306,7 @@ public void testEnumIntegerConstraint() throws Exception {

assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(1, fooTable.columns.size());

Expand All @@ -331,7 +331,7 @@ public void testEnumTinyIntConstraint() throws Exception {

assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(1, fooTable.columns.size());

Expand All @@ -355,7 +355,7 @@ public void testEnumSmallIntConstraint() throws Exception {

assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(1, fooTable.columns.size());

Expand All @@ -380,7 +380,7 @@ public void testEnumBigIntConstraint() throws Exception {

assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(1, fooTable.columns.size());

Expand All @@ -404,7 +404,7 @@ public void testEnumDoubleConstraint() throws Exception {

assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(1, fooTable.columns.size());

Expand All @@ -429,7 +429,7 @@ public void testEnumRealConstraint() throws Exception {

assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(1, fooTable.columns.size());

Expand All @@ -453,7 +453,7 @@ public void testEnumDecimalConstraint() throws Exception {

assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(1, fooTable.columns.size());

Expand All @@ -475,7 +475,7 @@ public void testEnumCharConstraint() throws Exception {

assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(1, fooTable.columns.size());

Expand All @@ -498,7 +498,7 @@ public void testEnumLikeConstraint() throws Exception {

assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(1, fooTable.columns.size());

Expand All @@ -520,7 +520,7 @@ public void testCreateEnumIntColumn() throws Exception {
DbInfoDto schema = DbInfoExtractor.extract(getConnection());
assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(1, fooTable.columns.size());

Expand All @@ -546,7 +546,7 @@ public void testCreateEnumColumn() throws Exception {
DbInfoDto schema = DbInfoExtractor.extract(getConnection());
assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(1, fooTable.columns.size());

Expand All @@ -571,7 +571,7 @@ public void testEnumColumn() throws Exception {
DbInfoDto schema = DbInfoExtractor.extract(getConnection());
assertEquals(1, schema.tables.size());

TableDto fooTable = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("Foo")).findAny().get();
TableDto fooTable = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("Foo")).findAny().get();

assertEquals(1, fooTable.columns.size());

Expand All @@ -598,7 +598,7 @@ public void testArray() throws Exception {
DbInfoDto schema = DbInfoExtractor.extract(getConnection());
assertEquals(1, schema.tables.size());

Optional<TableDto> fooTableOptional = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("foo")).findAny();
Optional<TableDto> fooTableOptional = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("foo")).findAny();
assertTrue(fooTableOptional.isPresent());
TableDto fooTable = fooTableOptional.get();

Expand All @@ -621,7 +621,7 @@ public void testMultidimensionalArrayOfTwoDimensions() throws Exception {
DbInfoDto schema = DbInfoExtractor.extract(getConnection());
assertEquals(1, schema.tables.size());

Optional<TableDto> fooTableOptional = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("foo")).findAny();
Optional<TableDto> fooTableOptional = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("foo")).findAny();
assertTrue(fooTableOptional.isPresent());
TableDto fooTable = fooTableOptional.get();

Expand All @@ -644,7 +644,7 @@ public void testMultidimensionalArrayOfThreeDimensions() throws Exception {
DbInfoDto schema = DbInfoExtractor.extract(getConnection());
assertEquals(1, schema.tables.size());

Optional<TableDto> fooTableOptional = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("foo")).findAny();
Optional<TableDto> fooTableOptional = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("foo")).findAny();
assertTrue(fooTableOptional.isPresent());
TableDto fooTable = fooTableOptional.get();

Expand All @@ -667,7 +667,7 @@ public void testBooleanNonlArray() throws Exception {
DbInfoDto schema = DbInfoExtractor.extract(getConnection());
assertEquals(1, schema.tables.size());

Optional<TableDto> fooTableOptional = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("foo")).findAny();
Optional<TableDto> fooTableOptional = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("foo")).findAny();
assertTrue(fooTableOptional.isPresent());
TableDto fooTable = fooTableOptional.get();

Expand All @@ -690,7 +690,7 @@ public void testVarCharArray() throws Exception {
DbInfoDto schema = DbInfoExtractor.extract(getConnection());
assertEquals(1, schema.tables.size());

Optional<TableDto> fooTableOptional = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("foo")).findAny();
Optional<TableDto> fooTableOptional = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("foo")).findAny();
assertTrue(fooTableOptional.isPresent());
TableDto fooTable = fooTableOptional.get();

Expand All @@ -714,7 +714,7 @@ public void testIntegerArrayWithMaxLengthColumn() throws Exception {
DbInfoDto schema = DbInfoExtractor.extract(getConnection());
assertEquals(1, schema.tables.size());

Optional<TableDto> fooTableOptional = schema.tables.stream().filter(t -> t.name.equalsIgnoreCase("foo")).findAny();
Optional<TableDto> fooTableOptional = schema.tables.stream().filter(t -> t.id.name.equalsIgnoreCase("foo")).findAny();
assertTrue(fooTableOptional.isPresent());
TableDto fooTable = fooTableOptional.get();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void testHandleNoRows(boolean useCompleteSqlHeuristics) throws Exception
DbInfoExtractor dbInfoExtractor = new DbInfoExtractor();
DbInfoDto schema = dbInfoExtractor.extract(connection);
assertEquals(1, schema.tables.size());
assertEquals("Person".toUpperCase(), schema.tables.get(0).name.toUpperCase());
assertEquals("Person".toUpperCase(), schema.tables.get(0).id.name.toUpperCase());

SqlHandler sqlHandler = new SqlHandler(null);
sqlHandler.setConnection(connection);
Expand Down Expand Up @@ -67,7 +67,7 @@ public void testHandleOneOrMoreRows(boolean useCompleteSqlHeuristics) throws Exc
DbInfoExtractor dbInfoExtractor = new DbInfoExtractor();
DbInfoDto schema = dbInfoExtractor.extract(connection);
assertEquals(1, schema.tables.size());
assertEquals("Person".toUpperCase(), schema.tables.get(0).name.toUpperCase());
assertEquals("Person".toUpperCase(), schema.tables.get(0).id.name.toUpperCase());

SqlScriptRunner.execCommand(connection, "INSERT INTO Person (person_id, first_name, last_name, age, email)\n" +
"VALUES (1, 'John', 'Doe', 30, '[email protected]');");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public SutInfoDto.OutputFormat getPreferredOutputFormat() {
public String startSut() {
running = true;

DbCleaner.clearDatabase(sqlConnection, DB_NAME,null, DatabaseType.MYSQL);
DbCleaner.clearDatabase_MySQL(sqlConnection, DB_NAME,null, null);
return "foo";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void testCaseSensitivityOfExtractor() throws Exception {

TableDto table = schema.tables.get(0);
assertEquals("intColumn",table.columns.get(0).name);
assertEquals("TableNot", table.name);
assertEquals("TableNot", table.id.name);

}

Expand Down Expand Up @@ -163,15 +163,15 @@ public void testTwoSchemas() throws Exception {
DbInfoDto schemaTest0 = DbInfoExtractor.extract(testUser0Connection);
assertEquals("test", schemaTest0.name);
assertEquals(1, schemaTest0.tables.size());
assertEquals("my_table", schemaTest0.tables.get(0).name);
assertEquals("my_table", schemaTest0.tables.get(0).id.name);

DbInfoDto newSchema = DbInfoExtractor.extract(testUser1Connection);
// assertEquals("new_schema", newSchema.name);
assertEquals("test", newSchema.name); //the connection is still on same URL, with same catalog
//assertEquals(1, newSchema.tables.size());
//we are now fetching data for all schemas (/catalogs in MySQL)
assertEquals(2, newSchema.tables.size());
assertEquals("my_table", newSchema.tables.get(0).name);
assertEquals("my_table", newSchema.tables.get(0).id.name);

SqlScriptRunner.execCommand(testUser1Connection, "DROP SCHEMA IF EXISTS new_schema");
deleteUserInDatabase(url, anotherTestUserName);
Expand Down
Loading
Loading