【发布时间】:2020-03-06 03:36:23
【问题描述】:
Web 上使用 Neo4j 进行 Spring 集成测试的大多数示例仍在 JUnit 4 上,并使用 Neo4jRule。
我们如何为 Neo4j + Spring + JUnit 5 创建设置?
【问题讨论】:
标签: spring neo4j spring-data-neo4j spring-test junit5
Web 上使用 Neo4j 进行 Spring 集成测试的大多数示例仍在 JUnit 4 上,并使用 Neo4jRule。
我们如何为 Neo4j + Spring + JUnit 5 创建设置?
【问题讨论】:
标签: spring neo4j spring-data-neo4j spring-test junit5
如果您在嵌入式上进行测试,请使用带有简单 Spring 配置的测试工具。
这里有一些例子:
https://medium.com/neo4j/testing-your-neo4j-based-java-application-34bef487cc3c
https://github.com/michael-simons/neo4j-sdn-ogm-tips/tree/master/examples/using-the-test-harness https://github.com/michael-simons/neo4j-sdn-ogm-tips/tree/master/examples/using-testcontainers
我会关注上面的^^ 这个和测试容器将是我们前进的方向。
注意:@Neo4jExtension 主要由核心团队内部使用,不推荐用于一般用途。
【讨论】: