> For the complete documentation index, see [llms.txt](https://bernardo.gitbook.io/development-docs-java/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bernardo.gitbook.io/development-docs-java/testing-spring/testing/request-path-testing.md).

# Request Path Testing

## Path Variable

This will use the "/path/code" URL

```java
mockMvc.perform(get("/path/{id}", "code"))
```

## **Query Parameters**

This will use the "/path?id=code" URL

```java
mockMvc.perform(get("/path").param("id", "code"))
```
