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
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.
I started a new project and configured it like so:
mix new example
cd example
I emptied ´lib/example.ex´ and placed the following code there:
Application.start :hound
defmodule Example do
use Hound.Helpers
def run do
Hound.start_session
navigate_to "http://akash.im"
IO.inspect page_title()
# Automatically invoked if the session owner process crashes
Hound.end_session
end
end
Example.run
This is the sample code provided at https://github.com/HashNuke/hound/blob/master/notes/simple-browser-automation.md
Then I installed Selenium server via brew install selenium-server-standalone (I'm on MacOS), started it via brew services start selenium-server-standalone and added config :hound, driver: "selenium" to config/config.exs
I added Application.ensure_all_started(:hound) as the first line of test/test_helper.exs.
Finally, I added {:hound, "~> 1.0"} to mix.exs and ran mix test. That is when I get the following compilation error:
localhost:example alex$ mix test
===> Compiling parse_trans
===> Compiling mimerl
===> Compiling metrics
===> Compiling unicode_util_compat
===> Compiling idna
==> jason
Compiling 8 files (.ex)
Generated jason app
==> ssl_verify_fun
Compiling 7 files (.erl)
Generated ssl_verify_fun app
===> Compiling certifi
===> Compiling hackney
==> hound
Compiling 37 files (.ex)
Generated hound app
==> example
Compiling 1 file (.ex)
== Compilation error in file lib/example.ex ==
** (ArgumentError) argument error
(stdlib) :ets.lookup(Hound.SessionServer, #PID<0.592.0>)
(hound) lib/hound/session_server.ex:19: Hound.SessionServer.current_session_id/1
(hound) lib/hound/session_server.ex:13: Hound.SessionServer.session_for_pid/2
lib/example.ex:7: Example.run/0
localhost:example alex$ mix test
Compiling 1 file (.ex)
== Compilation error in file lib/example.ex ==
** (ArgumentError) argument error
(stdlib) :ets.lookup(Hound.SessionServer, #PID<0.160.0>)
(hound) lib/hound/session_server.ex:19: Hound.SessionServer.current_session_id/1
(hound) lib/hound/session_server.ex:13: Hound.SessionServer.session_for_pid/2
lib/example.ex:7: Example.run/0
Am I forgetting a step somewhere or configuring things incorrectly? Any help immensely appreciated, thanks!
I emptied lib/example.ex and placed the following code there:
defmodule Example do
...
end
Example.run
There is a difference between .ex files and .exs files. You decided to put that code in the application's main .ex file. Get rid of this line:
Example.run
Then, to execute Example.run() you do this:
.../example$ iex -S mix
iex(1)> Example.run
"Akash Manohar // #HashNuke"
:ok
Or, you can change the extension to .exs, then run the code with this:
.../example$ mix run lib/example.exs
On the other hand, if you want mix test to run a test, then you have to put the test in the test directory. For example:
defmodule ExampleTest do
use ExUnit.Case
use Hound.Helpers
test "page title is correct" do
Hound.start_session
navigate_to "http://akash.im"
#IO.inspect page_title()
assert page_title() == "Akash Manohar // #HashNuke"
Hound.end_session
end
end
In the hound exunit example here, the hound_session() call caused an error for me:
15:06:33.736 [error] GenServer Hound.SessionServer terminating
** (RuntimeError) could not create a new session: timeout, check webdriver is running
(hound) lib/hound/session_server.ex:101: Hound.SessionServer.create_session/2
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.
UPDATED error message
I am getting a BOOT FAILED error every time I try to start the rabbitmq server. Does anybody know how I can fix this? I have attached the error message. I have tried a few different things including uninstalling and reinstalling it and am now getting a new error message, but am at a loss for what to try next. Any suggestions are much appreciated! Thank you!!
BOOT FAILED
===========
Error description:
{error,
{schema_integrity_check_failed,
[{table_missing,rabbit_exchange_serial},
{table_missing,rabbit_runtime_parameters},
{table_missing,rabbit_durable_queue},
{table_missing,rabbit_queue},
{table_missing,gm_group},
{table_missing,mirrored_sup_childspec}]}}
Log files (may contain more information):
/usr/local/var/log/rabbitmq/rabbit#localhost.log
/usr/local/var/log/rabbitmq/rabbit#localhost-sasl.log
Stack trace:
[{rabbit_mnesia,ensure_schema_integrity,0,
[{file,"src/rabbit_mnesia.erl"},{line,519}]},
{rabbit_mnesia,init_db,3,[{file,"src/rabbit_mnesia.erl"},{line,450}]},
{rabbit_mnesia,init_db_and_upgrade,3,
[{file,"src/rabbit_mnesia.erl"},{line,458}]},
{rabbit_mnesia,init,0,[{file,"src/rabbit_mnesia.erl"},{line,99}]},
{rabbit,'-run_boot_step/1-lc$^1/1-1-',1,
[{file,"src/rabbit.erl"},{line,488}]},
{rabbit,run_boot_step,1,[{file,"src/rabbit.erl"},{line,487}]},
{rabbit,'-start/2-lc$^0/1-0-',1,[{file,"src/rabbit.erl"},{line,453}]},
{rabbit,start,2,[{file,"src/rabbit.erl"},{line,453}]}]
BOOT FAILED
===========
Error description:
{could_not_start,rabbit,
{bad_return,
{{rabbit,start,[normal,[]]},
{'EXIT',
{rabbit,failure_during_boot,
{error,
{schema_integrity_check_failed,
[{table_missing,rabbit_exchange_serial},
{table_missing,rabbit_runtime_parameters},
{table_missing,rabbit_durable_queue},
{table_missing,rabbit_queue},
{table_missing,gm_group},
{table_missing,mirrored_sup_childspec}]}}}}}}}
Log files (may contain more information):
/usr/local/var/log/rabbitmq/rabbit#localhost.log
/usr/local/var/log/rabbitmq/rabbit#localhost-sasl.log
{"init terminating in do_boot",{rabbit,failure_during_boot,{could_not_start,rabbit,{bad_return,{{rabbit,start,[normal,[]]},{'EXIT',{rabbit,failure_during_boot,{error,{schema_integrity_check_failed,[{table_missing,rabbit_exchange_serial},{table_missing,rabbit_runtime_parameters},{table_missing,rabbit_durable_queue},{table_missing,rabbit_queue},{table_missing,gm_group},{table_missing,mirrored_sup_childspec}]}}}}}}}}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
I don't know how rabbitmq works, but the error message looks clear: it tries to delete the directory /usr/local/var/lib/rabbitmq/mnesia/rabbit#localhost-plugins-expand, and fails because the process has nt the access right to delete the file /usr/local/var/lib/rabbitmq/mnesia/rabbit#localhost-plugins-expand/amqp_client-3.1.3/ebin/amqp_auth_mechanisms.beam.
Take a look at who is the owner of this file and directory, what are the access right to them.
This occurred for me during a rabbitmq upgrade with brew.
It was easier for me to just remove the directory all together and install from scratch.
sudo rm -rf /usr/local/var/rabbitmq/
brew uninstall rabbitmq;
brew install rabbitmq
rabbitmq-server
Got this to work. Just delete the database directory and restart server. Note if you had brew installed, database might still be outside Cellar directory. So need to manually delete directory and restart.