Open yuraku opened 4 years ago
When BrowserStack Local is specified in POM is working fine, but when this code is executed in container, the build hangs out.
Build in container should work the same as on local.
Build process hangs out.
<browserstack.version>1.0.3</browserstack.version> <dependency> <groupId>com.browserstack</groupId> <artifactId>browserstack-local-java</artifactId> <version>${browserstack.version}</version> </dependency>
I'm using Java with JUnit5
Code for calling Local:
bsLocal = new Local(); HashMap<String, String> bsLocalArgs = new HashMap<String, String>(); bsLocalArgs.put("key", browserstackAccessKey); bsLocalArgs.put("localIdentifier", DefaultCapabilities.BROWSERSTACK_LOCAL_IDENTIFIER); bsLocalArgs.put("forcelocal", "true"); try { bsLocal.start(bsLocalArgs); } catch (Exception e) { LOG.error("Something went wrong while starting the local BrowserStack. " + e); }
Dockerfile:
FROM maven:3.5-jdk-8-slim as build ENV browser chrome WORKDIR /tests COPY ./project-dir /tests CMD ["mvn", "clean", "test", "-Denv=${browser}", "-DisBrowserstack=true"]
When BrowserStack Local is specified in POM is working fine, but when this code is executed in container, the build hangs out.
Expected Behavior
Build in container should work the same as on local.
Actual Behavior
Build process hangs out.
POM file
I'm using Java with JUnit5
Code for calling Local:
Dockerfile:
Platform details