Showing posts with label Testing. Show all posts
Showing posts with label Testing. Show all posts

June 11, 2024

Replace H2 with a real database in spring boot application

Springboot application facing bellow error or need to implement real test data base:

Senario:

Could not prepare statement [Table “XXXX” not found (this database is empty); SQL statement

Solution:

Add bellow configuration in test application.yml
spring:
 test: 
  database:
       replace: none

---

Code:

@DataJpaTest @TestPropertySource(properties = { "spring.test.database.replace=none", "spring.datasource.url=jdbc:tc:postgresql:16-alpine:///db" //Need to update based on the database })

Plugins:

testImplementation("org.springframework.boot:spring-boot-testcontainers")
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("org.testcontainers:mariadb")

Test containers:

 https://testcontainers.com/






References:

test container examples here


Read more ...

August 05, 2020

TestRail - Test management tool

TestRail is a webbased test management tool used by testers in the organisations, developers and other stake holders to manage, track and organize software testing efforts. It follows a centralized test management concept that helps in easy communication and enables rapid development of task across QA team and other stakeholders.



References:

Read more ...

My Favorite Site's List

#update below script more than 500 posts