Karate Performance testing : Getting build failure with error "Unrecognized VM option 'UseBiasedLocking' - karate

I am trying to reuse Karate tests for performance testing with Gatling and Scala.
I have configured everything as described in documentation. But then when I run the mvn command I am getting error "Unrecognized VM option 'UseBiasedLocking' Error: Could not create the Java Virtual Machine."
mvn command used to run tests: mvn test-compile gatling:test
Tried with looking at Env path variables and running the mvn command with different options. But still getting same error
Failed to execute goal io.gatling:gatling-maven-plugin:4.1.5:test (default-cli) on project PerformanceTesting: Gatling failed.: Process exited with an error: 1 (Exit value: 1)
Below is the POM file
Scala File

The issue is resolved after upgrading the gatling.plugin.version to 4.2.7 as my Java version 19 is not supporting old gatling plugin.
Below article helped to resolve
Unrecognized VM option 'UseBiasedLocking' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit

Related

Cannot run karate tests with CLI

I'm not able to execute tests using the CLI. The runner works. I'm using version 0.9.5.RC5 with maven command: " mvn test -f pom.xml exec:java -Dexec.mainClass=com.intuit.karate.cli.Main -Dexec.args='-d' -Dexec.classpathScope=test"
Here is the error:
ERROR com.intuit.karate - driver config / start failed: failed to construct class by name: karate-http.properties not found, aborting, options: {type=chrome, target=null}
I java karate-apache, karate-core and karate-junit4 as dependencies. The java version is 13
We don't yet support Java > 12: https://github.com/intuit/karate/tree/develop#getting-started
EDIT: use Karate 1.0

Android emulator tear down during tests run

guys!
I run my Android tests with Appium on Android emulator. Where I run my tests in sequence emulator sometimes tear down and remaining tests are ignored.
In Appium logs i see this error:
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command 'C:\\Users\\Username\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe -P 5037 -s emulator-5554 shell settings delete global hidden_api_policy_pre_p_apps' exited with code 20'; Stderr: 'cmd: Can't find service: settings'; Code: '20'
Is there anybody face with such problem?
You are trying to run an adb-shell command which is not allowed.
Appium has some in-secure commands that normally it will not allow them to be used.
You can see the commands here: Appium Insecure Features
The adb-shell commands (to change the system settings) is one of them.
Follow the link to how to prevent appium checking this.
How to resolve:
At the beginning of test setup, run this commnad: appium --relaxed-security with command line. Then the appium let you using the insecure feautures during the test.
for example in pyhton you should run os.system(appium --relaxed-security (while having appium directory in the system environment variables path.

Failure to build arch package - aborting

I'm trying to build a package for ArchLinux with the following command:
extra-x86_64-build -cr archbuild
It fails with the following error:
Dropping capabilities failed: Operation not permitted
Child died too early.
==> ERROR: Aborting...
I have no idea why is it failing.
Update: Running as root or a normal user makes no difference, both return the same error.

Getting BlazeInfoException in IntelliJ from the Bazel plugin

I just installed the Bazel plugin for IntelliJ, and I keep getting this exception:
com.google.idea.blaze.base.command.info.BlazeInfoException: blaze info failed with exit code: -1
java.util.concurrent.ExecutionException:
com.google.idea.blaze.base.command.info.BlazeInfoException: blaze info failed with exit code: -1
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:502)
[...]
at com.google.idea.blaze.base.async.FutureUtil$Builder.lambda$run$0(FutureUtil.java:93)
[...]
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:548)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
at com.google.idea.blaze.base.async.executor.BlazeExecutor$3.call(BlazeExecutor.java:108)
at com.google.idea.blaze.base.async.executor.BlazeExecutor$3.call(BlazeExecutor.java:105)
[...]
Caused by: com.google.idea.blaze.base.command.info.BlazeInfoException: blaze info failed with exit code: -1
at com.google.idea.blaze.base.command.info.BlazeInfoRunnerImpl.runBlazeInfo(BlazeInfoRunnerImpl.java:105)
at com.google.idea.blaze.base.command.info.BlazeInfoRunnerImpl.lambda$runBlazeInfo$2(BlazeInfoRunnerImpl.java:75)
... 6 more
Edit: I am using IntelliJ 2017.3 on MacOS El Capitan 10.11.6, Java JRE 1.8.0, and the Bazel version is 0.8.1-homebrew (the plugin version is 2017.11.20.0.4). I get this error when I try to setup a new Java project (an Hello World with only one class and one BUILD file containing a java_binary similar to this tutorial), and it appears when I click on the Bazel sync button.
The output in the Bazel console is:
Syncing project: Sync (incremental)...
Updating VCS...
Running Bazel info...
Command: info --tool_tag=ijwb:IDEA:community --curses=no --color=no --experimental_ui=no --progress_in_terminal_title=no --
==== TIMING REPORT ====
Sync: 47ms
BazelInfo: 4ms
Timing summary:
BlazeInvocation: 4ms
Sync failed
Command: git diff --name-status --no-renames abc8913346474d12ad45226503438848011929ae
Does anybody have an idea about what is it and/or how to fix it? Thanks!
I found my answer, thanks to this post.
In IntelliJ > Settings > Other Settings > Bazel Settings, the field "Bazel binary location" was empty. For my case, I entered /usr/local/bin/bazel and now it works!

xcodebuild failed to launch '/Applications/Xcode.app/Contents/Developer/Tools/otest' via Jenkins

error: failed to launch '/Applications/Xcode.app/Contents/Developer/Tools/otest' -- failed to get the task for process 34796
Hi,
When I run the command:
/usr/bin/xcodebuild -scheme my_scheme_name -configuration Debug build test
I get the following error:
error: failed to launch '/Applications/Xcode.app/Contents/Developer/Tools/otest' -- failed to get the task for process 34796
This only happens when the command is executed via Jenkins. Doesn't happen when I execute it from command line.
Has anyone else run into something like this?
The build itself builds an objective c library and the tests are SenTestCases. It's not an iOS app - it's an objective c library to be used in various apps
I used sudo DevToolsSecurity -enable to get past this problem.