Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
测试 Spring MVC 控制器的 @MessageMapping WebSocket 方法
我目前正在试验 Spring 4 0 中添加的对 WebSockets 的支持 如中所述本指南 http spring io guides gs messaging stomp websocket 如指南中所示 用注释的方法 Message
Java
Spring
SpringMVC
springtest
关于集成测试类的 Spring 配置文件
我们有由 java 测试类运行的 selenium 测试 在本地环境中一切正常 但我想在詹金斯上运行时关闭这些测试 所以我用 RunWith SpringJUnit4ClassRunner class SpringApplicationCo
Spring
springtest
Spring 测试多次关闭嵌入式数据库
我正在使用 h2 嵌入式数据库 其定义如下
Java
Spring
H2
springtest
embeddeddatabase
Spring @Autowire 没有通过`mvn verify`找到bean
我有一个 Spring 不是 Spring Boot 项目https github com poggs spring autowire it problem https github com poggs spring autowire it
Java
Spring
springtest
org.springframework.web.reactive.function.UnsupportedMediaTypeException:不支持内容类型“application/json;charset=UTF-8”
当我的代码如下时出现错误 Test public void getTemplateByIdTest throws Exception client get uri template getTemplate 7 exchange expect
Java
springtest
spring-boot 测试 - 多个测试可以共享一个上下文吗?
我创建了多个 spring boot 测试类 with spring boot 1 4 0 FirstActionTest java RunWith SpringRunner class WebMvcTest FirstAction cla
Java
Spring
springboot
springtest
使用@Profile决定执行测试类
根据https stackoverflow com a 33042872 4106030 https stackoverflow com a 33042872 4106030我们不应该使用 Profile让 spring 配置文件决定是否执
Java
Spring
springboot
springtest
springprofiles
使用 maven-surefire 运行测试时,Spring-Autowiring 在 @BeforeClass 之后发生
我在依赖注入 Spring 自动装配 和 maven surefire 方面遇到一些问题 当使用 TestNG 在 eclipse 中运行时 以下测试可以正常工作 服务对象被注入 然后 BeforeClass 方法被调用 Transacti
Java
Spring
Maven
TestNG
springtest
为什么使用 webflux 进行 Spring Boot 测试会忽略自定义 Jackson 模块
我正在使用 Spring Boot 2 0 1 和 WebFlux 路由器功能编写一个应用程序 not基于注释 对于我的一些数据对象 我编写了扩展的自定义序列化器StdSerializer 这些我注册在SimpleModule并将该模块公开
Java
springboot
Jackson
springtest
SpringWebFlux
如何在Spring每次测试之前重新创建数据库?
我的 Spring Boot Mvc Web 应用程序具有以下数据库配置application properties file spring datasource url jdbc h2 tcp localhost pdk spring d
Java
Spring
SpringMVC
springboot
springtest
使用 Spring mockMvc 测试可选路径变量
我在 Spring MVC 中有一个带有可选路径变量的方法 我正在尝试在未提供可选路径变量的情况下测试它 来自控制器的片段 要调用的资源 URI RequestMapping value some uri foo bar method Re
Java
Spring
SpringMVC
springtest
springtestmvc
在春季测试中请求范围内的bean
我想在我的应用程序中使用请求范围的 bean 我使用 JUnit4 进行测试 如果我尝试在这样的测试中创建一个 RunWith SpringJUnit4ClassRunner class ContextConfiguration locat
Java
Spring
JUnit
SpringMVC
springtest
如何在 Spring Boot 测试中设置“headless”属性?
我正在使用 Spring Boot 和 JavaFX 进行测试 基于一些优秀的 YouTube 视频 https www youtube com watch v hjeSOxi3uPg这解释了这一点 为了使其与TestFX https gi
Java
javafx
springboot
springtest
testfx
org.junit.platform.commons.JUnitException:ID为“junit-jupiter”的TestEngine未能发现测试
我想在 Gradle 项目中实施 Junit 5 测试 我试过这个 梯度配置 plugins id org springframework boot version 2 5 5 id io spring dependency managem
Java
JUnit
Junit5
springtest
junitjupiter
如何使用 @PathVariable 对 Spring MVC 控制器进行单元测试?
我有一个简单的带注释的控制器 与此类似 Controller public class MyController RequestMapping id html public String doSomething PathVariable S
Java
Spring
unittesting
SpringMVC
springtest
spring 我应该在每个类上使用@DirtiesContext吗
我有几个联合测试 ContextConfiguration locations file business src test resources application context test xml file src main weba
Spring
JUnit
springtest
无法构建 MockMvc(已经映射了 X 类型的处理程序)
我有简单的控制器类 Controller public class UserController RequestMapping user ResponseBody PostAuthorize hasPermission returnObje
Java
Spring
SpringMVC
springtest
springaspects
@DataJpaTest 中的存储库初始化为 null
我正在尝试在 Spring Boot 应用程序中为存储库编写一些测试 但是存储库自动连接为null 测试类的代码如下 package jpa project repo import org junit Assert import org j
Java
springboot
JUnit
SpringDataJPA
springtest
@SQL 每堂课一次
我正在使用 spring 框架编写一些集成测试 我对不同的集成测试类有不同的 SQL 脚本 像这样的事情 ContextConfiguration classes Sql classpath sportCenter test sql pub
Spring
SpringMVC
springtest
使用 Spring MVC 和 Mockito 的 MockMvc 测试没有 JSON 内容(出现 null)
拥有一个使用 SpringMVC 4 0 3 RELEASE 实现 Restful Web 服务的代码库 代码库包含一个功能齐全的 Restful Web 服务 我可以使用 postman 和curl 验证它的工作原理 但是 当尝试使用 M
SpringMVC
Mockito
Junit4
springtest
MockMvc
«
1
2
3
4
»