We have a commercial microservice template on which we are doing Integration Testing but due to below error not able to move forward.
When we try to debug Test, call goes to below function then on next process it throws error.
`private static SqliteConnection CreateDatabaseAndGetConnection() { var connection = new SqliteConnection("Data Source=:memory:"); connection.Open();
new TestServiceDbContext(
new DbContextOptionsBuilder<TestServiceDbContext>().UseSqlite(connection).Options
).GetService<IRelationalDatabaseCreator>().CreateTables();
return connection;
}
`
Could you please provide Quick fix on this issue.
3 Answer(s)
-
0
hi
Steps and code to reproduce?
-
0
hi
Steps and code to reproduce?
Steps to reproduce; Commercial Microservice Version : 5.0.1
Open any Test case from Efcore Test project
On any Method like GetlistAsync try to debug.
Put a breakpoint in CreateDatabaseAndGetConnection()
Also breakpoint in EfcoreModule as shown in Screenshot. (Here is it throwing an exception)
-
0
hi
Commercial Microservice Version : 5.0.1
Can you try to upgrade to 5.1 or the latest?
You can also create a new version of Microservice template, and check the code of
TestModules
https://support.abp.io/QA/Questions/2626/The-unit-test-cases-are-not-working-in-the-Abp-IO-Microservice