Absolute path not shown properly in Jmeter with WDS - groovy

For a scenario, I am using Jmeter with WebDriver Sampler. So for uploading a file, since I need to run in Jenkins, I have to pass the absolute path of file. To get the current path I defined following command in User Defined variable.
${__groovy(import org.apache.jmeter.services.FileServer; FileServer.getFileServer().getBaseDir();)}${__groovy(File.separator)}
When I log this its working fine. Its showing the file path correctly. But when I use this in WDS and try to log. I am getting the file path with all the backslash removed and unnecessary spaces.
C:\ram\file\part1\renamed.txt
It has to be printed like this, but instead
cramfilepartrename d
It prints like this. Any idea what can be the issue ?

I cannot reproduce your problem using latest versions of JMeter and WebDriver Sampler:
Make sure to upgrade to JMeter 4.0 (or whatever is the latest version available at downloads page)
Make sure to upgrade WebDriver Sampler plugin to version 2.3 using JMeter Plugins Manager
Make sure to use WDS.log shorthand to print the variable value

Related

CPython Script Executor does't work on Pentaho Kettle

Hellow Guys
First of all, i'm using the windows 10, java_1.8.0_333, and Pentaho 9.3
I'm trying to many ways to run my Python code in Pentaho, but isn't work.
I try reinstall my Python using diferent version, try to change my java version, and try oldest version of Pentaho, but no way works.
If a ran my Python script using the PyCharm, it's works, but if i try to run the same script, or create a new Python script in Pentaho, does't works, and i receive this error.
Inside CPython is a basic script that declares the variable name and receives the string "Test"
I think this error is about somenthing in my computer, but i don't no why
Can anyone help me with this ?

How to get "AWS Transcribe" To Work within Tomcat (Windows Service based) Using System.exec()?

I'm trying to run the amazon-provided python AWS Example for transcribing an audio file in a Java program using "System.exec()". I've substituted the various parts of the program to use parameters passed in. This code works as expected on a Mac, but in Windows (under Tomcat Service), the exact same System.exec() always returns null.
Basic Python code is here: https://docs.aws.amazon.com/code-samples/latest/catalog/python-transcribe-getting_started.py.html
I thought it might be an authentication problem, but I've authenticated trying the config file in the expected location, Environment Variables, and even System.setProperty() statements. Still always null.
Here's the Java code:
process = Runtime.getRuntime().exec(cmdArray);
reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
The command array has:
python
path to python 'py' file
parameters
The code crashes on the subsequent line (null):
reader.readLine()
I have the Tomcat service set up to use 8MB RAM and have re-installed Tomcat to the latest 9 release.
If I take the individual parameters at the command line and execute them, it's all fine.
Would appreciate any suggestions.
Thanks in advance.

Golem Task respons back with runtime error 2, can't determine the cause

Repo for all code I've been using is updated here . When I run the requestor script it exits with a runtime error 2 (File not found). I am not sure how to further debug this or fix it. So far I've converted my code over to a python slim docker image to better mirror the example. It also works for me when I spin up a docker image that typing and running "/golem/work/imageclassifier.py --trainmodel" works from root. I switched all my code to use absolute paths. I also did make sure the shebang (#!) uses linux end of file characters rather than windows before which was giving me errors. Fixed a bug where my script returns error code 2 when called with no args to now pass.
clf.fit(trainDataGlobal, trainLabelsGlobal)
pkl_file = "classifier.pkl"
with open(pkl_file, 'wb') as file:
pickle.dump(clf, file)
is the only piece I could think of that causes the issue, but as far as I can tell this is the proper way to pickle something in python. Requestor script is also heavily based on the simple service example and I tried to mirror my design to that. I just need help in getting more information while debugging, or guidance on how to move forward from here

updatesystem does not consider config json

I am trying to perform system update from command line with a json config but it seems that, no matter what I do,
the command does the exact same thing, which I suppose is running the update with the default platform settings.
For example, when I tried to perform my update without essential data("essential": "false" in json config), essential impexes are also being run.
I tried with an invalid json(that does not have json format) and the build was successfull.
I also tried giving as a paramter a json that does not exist and yet, the build was successfull and essential impexes were also run.
So, it seems to me that, no matter what I do, the json is not taken into account and the update works with the default platform settings.
This is the command I am using:
ant updatesystem -Dtenant=master -DconfigFile=Path/updatesystem.json
Am I doing something wrong or how can I pass my configuration during system update from command line ?
PS:
Hybris version: 6.7.0.25
I Think your JSON path is wrong and please try to do it like this.
ant updatesystem -DconfigFile=../custom/testcore/resources/updatesystem-configuration.json
The problem was caused by the fact that the "updatesystem" macro was overriden in a project specific file and the configFile property was not passed to the UpdatePlatformAntPerformableImpl during creation. That is why, regardless of my input for configFile property , nothing changed.
I fixed the problem by also passing the configFile in the constructor:
new de.hybris.ant.taskdefs.UpdatePlatformAntPerformableImpl("${tenant}", "${configFile}")

Ezjail and /etc/jail.conf in FreeBSD 10.2

I have a question regarding the following warning when using
Ezjail-3.4.1 on FreeBSD 10.2
/etc/rc.d/jail: WARNING: Per-jail configuration via jail_* var "enter code here" iables is obsolete. Please consider to migrate to /etc/jail.conf "enter code here"It is my understanding that this has changed in FreeBSD 9.0 but since 10.2 the new way is the default method and that warning is being generated.I haven't been able to find any information about this on google, a lot of users mentioning the errors but ignoring them because their jails still work.AFAIK in 10.0 the rc.d/jail script converts the old-style jail_
variables into a temporary jail.conf to handle the jail. So the warning
is generated by rc.d/jail
Regards
Mr-Hill
As you found out, jails on FreeBSD 10.x use a new configuration method. From /usr/src/UPDATING:
20131010:
The rc.d/jail script has been updated to support jail(8)
configuration file. The "jail_<jname>_*" rc.conf(5) variables
for per-jail configuration are automatically converted to
/var/run/jail.<jname>.conf before the jail(8) utility is invoked.
This is transparently backward compatible. See below about some
incompatibilities and rc.conf(5) manual page for more details.
These variables are now deprecated in favor of jail(8) configuration
file. One can use "rc.d/jail config <jname>" command to generate
a jail(8) configuration file in /var/run/jail.<jname>.conf without
running the jail(8) utility. The default pathname of the
configuration file is /etc/jail.conf and can be specified by
using $jail_conf or $jail_<jname>_conf variables.
Please note that jail_devfs_ruleset accepts an integer at
this moment. Please consider to rewrite the ruleset name
with an integer.
ezjail was never updated to use this new method, but that's ok: FreeBSD still accepts the previous method. You can ignore this warning.

Resources