I'm new using Selenium and I find a problem after running mvn verify with my test included in my code. I'm using Java Junit with webdriver.
Here is my test code:
import java.util.regex.Pattern;
import java.util.concurrent.TimeUnit;
import org.junit.*;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;
public class SeleniumTest {
private WebDriver driver;
private String baseUrl;
private boolean acceptNextAlert = true;
private StringBuffer verificationErrors = new StringBuffer();
public static void main(String[] args) {
System.setProperty("webdriver.gecko.driver", "/home/francop/Downloads/geckodriver");
WebDriver driver = new FirefoxDriver();
driver.get("http://localhost:8448/login");
driver.quit();
}
#Before
public void setUp() throws Exception {
System.setProperty("webdriver.gecko.driver", "/home/francop/Downloads/geckodriver");
driver = new FirefoxDriver();
baseUrl = "http://localhost:8448/login";
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
#Test
public void testSelenium() throws Exception {
driver.get(baseUrl);
driver.findElement(By.name("username")).clear();
driver.findElement(By.name("username")).sendKeys("dbaranowski");
driver.findElement(By.name("password")).clear();
driver.findElement(By.name("password")).sendKeys("dbaranowski");
driver.findElement(By.cssSelector("input[type=\"submit\"]")).click();
driver.findElement(By.id("searchBtn")).click();
driver.findElement(By.id("icon")).click();
driver.findElement(By.id("filter-button")).click();
driver.findElement(By.id("clear-button")).click();
driver.findElement(By.id("filter-button")).click();
driver.findElement(By.id("clear-button")).click();
driver.findElement(By.id("input")).click();
driver.findElement(By.xpath("//div[#id='contentWrapper']/div/paper-listbox/paper-item")).click();
driver.findElement(By.id("filter-button")).click();
driver.findElement(By.id("scrim")).click();
driver.findElement(By.xpath("(//input[#value='MORON '])[4]")).click();
driver.findElement(By.cssSelector("#infoBtn > #icon")).click();
driver.findElement(By.xpath("//paper-dialog[#id='affectedClientsDetail']/div[5]/paper-button[3]")).click();
driver.findElement(By.xpath("(//input[#value='MORON '])[16]")).click();
driver.findElement(By.cssSelector("#infoBtn > #icon")).click();
driver.findElement(By.id("insertClientBtn")).click();
driver.findElement(By.xpath("//vaadin-grid[#id='grid']/div/div[3]")).click();
driver.findElement(By.xpath("(//input[#value='MORON '])[13]")).click();
driver.findElement(By.cssSelector("#infoBtn > #icon")).click();
driver.findElement(By.xpath("//vaadin-grid[#id='grid']/div/div[3]")).click();
driver.findElement(By.xpath("(//input[#value='MORON '])[16]")).click();
driver.findElement(By.cssSelector("#infoBtn > #icon")).click();
driver.findElement(By.id("insertClientBtn")).click();
driver.findElement(By.xpath("//vaadin-grid[#id='grid']/div/div[3]")).click();
driver.findElement(By.xpath("(//input[#value='MORON '])[13]")).click();
driver.findElement(By.cssSelector("#infoBtn > #icon")).click();
driver.findElement(By.id("infoBtn")).click();
driver.findElement(By.id("insertClientBtn")).click();
driver.findElement(By.xpath("(//input[#id='input'])[13]")).clear();
driver.findElement(By.xpath("(//input[#id='input'])[13]")).sendKeys("0387722559");
driver.findElement(By.xpath("(//iron-icon[#id='icon'])[32]")).click();
driver.findElement(By.xpath("//iron-collapse[#id='collapse1']/div[2]/paper-button")).click();
driver.findElement(By.id("modifyInt")).click();
driver.findElement(By.xpath("//paper-dialog[#id='affectedClientsDetail']/div[3]/paper-button")).click();
driver.findElement(By.cssSelector("#exportBtn > #icon")).click();
driver.findElement(By.cssSelector("body.layout.vertical > #exportDialog > div.buttons > paper-button.x-scope.paper-button-0")).click();
driver.findElement(By.cssSelector("#selection-button > #icon")).click();
driver.findElement(By.xpath("//button[#type='button']")).click();
driver.findElement(By.id("gwt-uid-3")).click();
driver.findElement(By.id("gwt-uid-4")).click();
driver.findElement(By.id("gwt-uid-5")).click();
driver.findElement(By.id("gwt-uid-6")).click();
driver.findElement(By.id("gwt-uid-7")).click();
driver.findElement(By.id("gwt-uid-8")).click();
driver.findElement(By.id("gwt-uid-9")).click();
driver.findElement(By.cssSelector("#gwt-uid-10 > span.v-on > div")).click();
driver.findElement(By.id("gwt-uid-11")).click();
driver.findElement(By.id("gwt-uid-12")).click();
driver.findElement(By.id("gwt-uid-13")).click();
driver.findElement(By.cssSelector("#gwt-uid-14 > span.v-on > div")).click();
driver.findElement(By.cssSelector("#gwt-uid-15 > span.v-on > div")).click();
driver.findElement(By.cssSelector("#gwt-uid-16 > span.v-on > div")).click();
driver.findElement(By.id("gwt-uid-16")).click();
driver.findElement(By.id("gwt-uid-15")).click();
driver.findElement(By.id("gwt-uid-14")).click();
driver.findElement(By.id("gwt-uid-13")).click();
driver.findElement(By.id("gwt-uid-12")).click();
driver.findElement(By.xpath("//button[#type='button']")).click();
driver.findElement(By.cssSelector("#copy-button > #icon")).click();
driver.findElement(By.id("gwt-uid-47")).click();
driver.findElement(By.cssSelector("label.vaadin-grid.style-scope")).click();
driver.findElement(By.cssSelector("#selection-button > #icon")).click();
driver.findElement(By.id("icon")).click();
driver.findElement(By.xpath("//div[#id='tabsContent']/paper-tab[2]/div")).click();
driver.findElement(By.id("icon")).click();
driver.findElement(By.id("paperToggle")).click();
driver.findElement(By.xpath("//div[#id='tabsContent']/paper-tab[2]/div")).click();
driver.findElement(By.id("paperToggle")).click();
driver.findElement(By.xpath("(//div[#id='checkboxContainer'])[23]")).click();
driver.findElement(By.xpath("(//iron-icon[#id='icon'])[10]")).click();
driver.findElement(By.xpath("(//div[#id='buttons']/paper-checkbox)[3]")).click();
driver.findElement(By.xpath("(//div[#id='buttons']/paper-checkbox)[2]")).click();
driver.findElement(By.xpath("(//div[#id='checkboxContainer'])[20]")).click();
driver.findElement(By.xpath("(//iron-icon[#id='icon'])[9]")).click();
driver.findElement(By.xpath("//div[#id='tabsContent']/paper-tab/div")).click();
driver.findElement(By.id("filter-button")).click();
driver.findElement(By.id("scrim")).click();
driver.findElement(By.id("searchBtn")).click();
driver.findElement(By.cssSelector("#logoutBtn > #icon")).click();
driver.findElement(By.cssSelector("#logoutDialog > div.buttons > paper-button.x-scope.paper-button-0")).click();
driver.findElement(By.name("username")).clear();
driver.findElement(By.name("username")).sendKeys("");
driver.findElement(By.name("password")).clear();
driver.findElement(By.name("password")).sendKeys("");
}
#After
public void tearDown() throws Exception {
driver.quit();
String verificationErrorString = verificationErrors.toString();
if (!"".equals(verificationErrorString)) {
fail(verificationErrorString);
}
}
private boolean isElementPresent(By by) {
try {
driver.findElement(by);
return true;
} catch (NoSuchElementException e) {
return false;
}
}
private boolean isAlertPresent() {
try {
driver.switchTo().alert();
return true;
} catch (NoAlertPresentException e) {
return false;
}
}
private String closeAlertAndGetItsText() {
try {
Alert alert = driver.switchTo().alert();
String alertText = alert.getText();
if (acceptNextAlert) {
alert.accept();
} else {
alert.dismiss();
}
return alertText;
} finally {
acceptNextAlert = true;
}
}
}
I generate this using selenium IDE for firefox and exported it as Java / Junit / Webdriver. Integrating it in src/test/java/ and also adding the necesary dependencies to my pom.xml
When I run in my terminal mvn verify it loads the test and finish with fail:
Failed tests:
SeleniumTest.testSelenium on testSelenium(SeleniumTest)(SeleniumTest)
Run 1: SeleniumTest.setUp:29 ยป IllegalAccess tried to access class org.openqa.seleniu...
Run 2: SeleniumTest.tearDown:130 NullPointer
This is the full error log:
java.lang.IllegalAccessError: tried to access class org.openqa.selenium.os.ExecutableFinder from class org.openqa.selenium.firefox.FirefoxBinary
at org.openqa.selenium.firefox.FirefoxBinary.locateFirefoxBinariesFromPlatform(FirefoxBinary.java:412)
at org.openqa.selenium.firefox.FirefoxBinary.<init>(FirefoxBinary.java:108)
at java.util.Optional.orElseGet(Optional.java:267)
at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:204)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:108)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:104)
at SeleniumTest.setUp(SeleniumTest.java:29)
testSelenium on testSelenium(SeleniumTest)(SeleniumTest) Time elapsed: 0.184 sec <<< FAILURE!
java.lang.NullPointerException: null
at SeleniumTest.tearDown(SeleniumTest.java:130)
Also I'm trying to use hedless test with Xvfb but I'm unable to even verify it in my local machine. I'm using Ubuntu 17.10
I wasn't able to find any step by step implementation for this. Or for integrate the test into jenkinsfile for a jenkins pipeline
You should add extension to the Gecko Driver to resolve one of the error.
System.setProperty("webdriver.gecko.driver", "/home/francop/Downloads/geckodriver.exe");
WebDriver driver = new FirefoxDriver();
Related
I am trying to run acceptance tests with concordion fixtures in a quarkus project. Concordion does not work with Junit5 so I am using its original #Run(ConcordionRunner.class).
I am creating a superclass to start my quarkus application before tests like that:
#RunWith(ConcordionRunner.class)
public abstract class AbstractFixture {
public static RunningQuarkusApplication application;
protected static RequestSpecification server;
protected AbstractFixture() {
setUp();
}
public void setUp() {
if(application == null) {
startApplication();
server = new RequestSpecBuilder()
.setPort(8081)
.setContentType(ContentType.JSON)
.build();
}
}
private void startApplication() {
try {
PathsCollection.Builder rootBuilder = PathsCollection.builder();
Path testClassLocation = PathTestHelper.getTestClassesLocation(getClass());
rootBuilder.add(testClassLocation);
final Path appClassLocation = PathTestHelper.getAppClassLocationForTestLocation(
testClassLocation.toString());
rootBuilder.add(appClassLocation);
application = QuarkusBootstrap.builder()
.setIsolateDeployment(false)
.setMode(QuarkusBootstrap.Mode.TEST)
.setProjectRoot(Paths.get("").normalize().toAbsolutePath())
.setApplicationRoot(rootBuilder.build())
.build()
.bootstrap()
.createAugmentor()
.createInitialRuntimeApplication()
.run();
} catch (BindException e) {
e.printStackTrace();
System.out.println("Address already in use - which is fine!");
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
The code above is working but I can't change the default port 8081 to any other.
If I print the config property in my Test class like below, it prints the port correctly, but quarkus is not running on it:
public class HelloFixture extends AbstractFixture {
public String getGreeting() {
Response response = given(server).when().get("/hello");
System.out.println("Config[port]: " + application.getConfigValue("quarkus.http.port", String.class));
return response.asString();
}
}
How can I specify the configuration file or property programatically before run?
I found the answer. At first, I was referencing the wrong property "quarkus.http.port" instead of "quarkus.http.test-port".
Despite that, I found the way to override properties before run:
...
StartupAction action = QuarkusBootstrap.builder()
.setIsolateDeployment(false)
.setMode(QuarkusBootstrap.Mode.TEST)
.setProjectRoot(Paths.get("").normalize().toAbsolutePath())
.setApplicationRoot(rootBuilder.build())
.build()
.bootstrap()
.createAugmentor()
.createInitialRuntimeApplication();
action.overrideConfig(getConfigOverride());
application = action.run();
...
private Map<String, String> getConfigOverride() {
Map<String, String> config = new HashMap<>();
config.put("quarkus.http.test-port", "18082");
return config;
}
I have implemented an event listener for Cucumber events:
public class AdccEventListener implements ConcurrentEventListener {
private static boolean stepFailed = false;
#Override
public void setEventPublisher(EventPublisher publisher) {
System.out.println("register handlers!!!");
publisher.registerHandlerFor(TestCaseStarted.class, this::scenarioStartedHandler);
publisher.registerHandlerFor(TestCaseFinished.class, this::scenarioFinishedHandler);
publisher.registerHandlerFor(TestStepStarted.class, this::stepStartedHandler);
publisher.registerHandlerFor(TestStepFinished.class, this::stepFinishedHandler);
}
private void scenarioStartedHandler(TestCaseStarted event) {
stepFailed = false;
}
private void scenarioFinishedHandler(TestCaseFinished event) {
BaseTestUtils.reportInfoMessage("Scenario finish name is: " + event.getTestCase().getName() + " end of Scenario statement!");
if (stepFailed) {
Result result = event.getResult();
setPrivateField(result, "status", Status.FAILED);
}
}
private void stepStartedHandler(TestStepStarted event) {
if (event.getTestStep() instanceof PickleStepTestStep) {
PickleStepTestStep testStep = (PickleStepTestStep) event.getTestStep();
BaseTestUtils.reportInfoMessage("step name is: " + testStep.getStep().getText() + " end of statement!");
ThreadLocalEvent.setStep(testStep);
}
}
private void stepFinishedHandler(TestStepFinished event) {
if (event.getTestStep() instanceof PickleStepTestStep) {
PickleStepTestStep testStep = (PickleStepTestStep) event.getTestStep();
Result result = event.getResult();
ThreadLocalEvent.setResult(result);
if (result.getStatus().equals(Status.FAILED)) {
if (!testStep.getStep().getKeyWord().startsWith("Given")) {
stepFailed = true;
setPrivateField(result, "status", Status.PASSED);
}
}
}
}
private void setPrivateField(Object subject, String fieldName, Object value) {
try {
Field f = subject.getClass().getDeclaredField(fieldName);
f.setAccessible(true);
f.set(subject, value);
} catch (Exception e) {
e.printStackTrace();
}
}
}
i have declared the Event Listener as a plugin in the CucumberOptions of the RunTests class.
#CucumberOptions(plugin = {"pretty", "html:target/cucumber", "json:target/cucumber.json", "com.radware.bdd.AdccEventListener"},
glue = {"com.radware.tests"},
features = {"src/test/resources/Features"},
strict = true,
tags = {"#Functional"})
Now when i am executing tests on my local work station all is good. i am getting all events that were published in listener.
But, When the same project is executed on the docker container, listener does not get any events.
f. e. start Step, end Step events.
any idea what could cause it to not work under container?
Thank you.
Stas
I have found a problem.
When Maven tests were initiated from Jenkins or Docker container CucumberOptions arguments were passed. one of arguments was "--plugin". so my local definitions were overwritten.
Resolution is to add my custom plugin "com.radware.bdd.AdccEventListener" to the options passed through cli command.
I want my jersey tests to run on one instance of tomcat which has the rest services running at
http://myhost:port/contexpath/service1/
http://myhost:port/contexpath/service2/
..so on
I have both in memory and external container dependencies
[ group: 'org.glassfish.jersey.test-framework.providers', name: 'jersey-test-framework-provider-inmemory', version: '2.17'],
[group: 'org.glassfish.jersey.test-framework.providers', name: 'jersey-test-framework-provider-external' , version: '2.17'],
Then in the test i over ride the below method to decide which container to choose
#Override
public TestContainerFactory getTestContainerFactory() {
System.setProperty("jersey.test.host", "localhost");
System.setProperty("jersey.config.test.container.port", "8000");
//how to set the context path ??
return new ExternalTestContainerFactory();
}
The in memory test works because the services are deployed by the framework at path which it knows(it does not have a context path anyway)
When i run on external container it tries to connect to http://myhost:port/service1/ instead of http://myhost:port/contexpath/service1/ thus getting 404 not found
To run on an external container how do i specify the context path ?
The documentation specifies only host and port property.Is there any property for context path ?
I am using Jersey 2.17
Finally I figured out a solution
#Override
public TestContainerFactory getTestContainerFactory() {
return new ExternalTestContainerFactory(){
#Override
public TestContainer create(URI baseUri, DeploymentContext context)
throws IllegalArgumentException {
try {
baseUri = new URI("http://localhost:8000/contextpath");
} catch (URISyntaxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return super.create(baseUri, context);
}
};
}
If you have your external servlet:
Import the jersey-test-framework-core apis to implement your own TestContainerFactory
testCompile 'org.glassfish.jersey.test-framework:jersey-test-framework-core:2.22.2'
.
Let JerseyTest know you will have your own provider through SystemProperties
systemProperty 'jersey.config.test.container.factory', 'my.package.MyTestContainerFactory'
.
Create your own provider (better and more custom configurable than their jersey-test-framework-provider-external)
import org.glassfish.jersey.test.spi.TestContainer;
import org.glassfish.jersey.test.spi.TestContainerFactory;
public class MyTestContainerFactory implements TestContainerFactory {
#Override
public TestContainer create(URI baseUri, DeploymentContext deploymentContext) {
return new TestContainer(){
#Override
public ClientConfig getClientConfig() {
return null;
}
#Override
public URI getBaseUri() {
return URI.create("http://localhost:8080/myapp/api");
}
#Override
public void start() {
// Do nothing
}
#Override
public void stop() {
// Do nothing
}
};
}
}
How do I launch a browser automatically after starting the spring boot application.Is there any listener method callback to check if the webapp has been deployed and is ready to serve the requests,so that when the browser is loaded , the user sees the index page and can start interacting with the webapp?
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
// launch browser on localhost
}
Below code worked for me:
#EventListener({ApplicationReadyEvent.class})
void applicationReadyEvent() {
System.out.println("Application started ... launching browser now");
browse("www.google.com");
}
public static void browse(String url) {
if(Desktop.isDesktopSupported()){
Desktop desktop = Desktop.getDesktop();
try {
desktop.browse(new URI(url));
} catch (IOException | URISyntaxException e) {
e.printStackTrace();
}
}else{
Runtime runtime = Runtime.getRuntime();
try {
runtime.exec("rundll32 url.dll,FileProtocolHandler " + url);
} catch (IOException e) {
e.printStackTrace();
}
}
}
#SpringBootApplication
#ComponentScan(basePackageClasses = com.io.controller.HelloController.class)
public class HectorApplication {
public static void main(String[] args) throws IOException {
SpringApplication.run(HectorApplication.class, args);
openHomePage();
}
private static void openHomePage() throws IOException {
Runtime rt = Runtime.getRuntime();
rt.exec("rundll32 url.dll,FileProtocolHandler " + "http://localhost:8080");
}
}
You could do it by some java code. I am not sure if spring boot has something out of the box.
import java.awt.Desktop;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
public class Browser {
public static void main(String[] args) {
String url = "http://www.google.com";
if(Desktop.isDesktopSupported()){
Desktop desktop = Desktop.getDesktop();
try {
desktop.browse(new URI(url));
} catch (IOException | URISyntaxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}else{
Runtime runtime = Runtime.getRuntime();
try {
runtime.exec("xdg-open " + url);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
I've recently been attempting to get this working myself, I know it's been a while since this question was asked but my working (and very basic/simple) solution is shown below. This is a starting point for anyone wanting to get this working, refactor as required in your app!
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import java.awt.*;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
#SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
openHomePage();
}
private static void openHomePage() {
try {
URI homepage = new URI("http://localhost:8080/");
Desktop.getDesktop().browse(homepage);
} catch (URISyntaxException | IOException e) {
e.printStackTrace();
}
}
}
If you package the application as a WAR file, configure an application server, like Tomcat, and restart the configured application server through your IDE, IDEs can automatically open a browser-tab.
If you want to package your application as a JAR file, your IDE will not be able to open a web browser, so you have to open a web browser and type the desired link(localhost:8080). But in the developing phase, taking these boring steps might be very tedious.
It is possible to open a browser with Java programming language after the spring-boot application gets ready. You can use the third-party library like Selenium or use the following code snippet.
The code snippet to open a browser
#EventListener({ApplicationReadyEvent.class})
private void applicationReadyEvent()
{
if (Desktop.isDesktopSupported())
{
Desktop desktop = Desktop.getDesktop();
try
{
desktop.browse(new URI(url));
} catch (IOException | URISyntaxException e)
{
e.printStackTrace();
}
} else
{
Runtime runtime = Runtime.getRuntime();
String[] command;
String operatingSystemName = System.getProperty("os.name").toLowerCase();
if (operatingSystemName.indexOf("nix") >= 0 || operatingSystemName.indexOf("nux") >= 0)
{
String[] browsers = {"opera", "google-chrome", "epiphany", "firefox", "mozilla", "konqueror", "netscape", "links", "lynx"};
StringBuffer stringBuffer = new StringBuffer();
for (int i = 0; i < browsers.length; i++)
{
if (i == 0) stringBuffer.append(String.format("%s \"%s\"", browsers[i], url));
else stringBuffer.append(String.format(" || %s \"%s\"", browsers[i], url));
}
command = new String[]{"sh", "-c", stringBuffer.toString()};
} else if (operatingSystemName.indexOf("win") >= 0)
{
command = new String[]{"rundll32 url.dll,FileProtocolHandler " + url};
} else if (operatingSystemName.indexOf("mac") >= 0)
{
command = new String[]{"open " + url};
} else
{
System.out.println("an unknown operating system!!");
return;
}
try
{
if (command.length > 1) runtime.exec(command); // linux
else runtime.exec(command[0]); // windows or mac
} catch (IOException e)
{
e.printStackTrace();
}
}
}
Using Selenium to open a browser
To use the selenium library add the following dependency to your pom.xml file.
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
Then in your main class, add the following code snippet.
#EventListener({ApplicationReadyEvent.class})
private void applicationReadyEvent()
{
String url = "http://localhost:8080";
// pointing to the download driver
System.setProperty("webdriver.chrome.driver", "Downloaded-PATH/chromedriver");
ChromeDriver chromeDriver = new ChromeDriver();
chromeDriver.get(url);
}
Notice: It is possible to use most of the popular browsers like FirefoxDriver, OperaDriver, EdgeDriver, but it is necessary to download browsers' drivers beforehand.
Runtime rt = Runtime.getRuntime();
try {
rt.exec("cmd /c start chrome.exe https://localhost:8080");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
The code above worked for me. Change chrome.exe to the browser of your choice and Url to to your choice.
Note: You must include the scheme - http or https, and the browser you choose must me installed, else your app will run without opening the browser automatically.
Works only for windows though.
I'm trying to run a Restfuse test using NetBeans.
NetBeans is using the following Maven command to run the Restfuse Test:
mvn -Dtest=com.mycompany.RequestTest -DfailIfNoTests=false test-compile surefire:test
However, the HttpTest method didn't get called:
#RunWith(HttpJUnitRunner.class)
public class RequestTest {
#Rule
public Destination destination;
#Context
private Response response;
public MatchRequestTest() throws UnknownHostException {
this.destination = getDestination();
this.callbackHost = InetAddress.getLocalHost().getHostAddress();
}
#HttpTest(method = Method.GET, path = "/request")
public void matchRequest() {
assertOk(response);
}
}
Prefix your class name with "Test" i.e. TestRequestTest.