Is it possible to mention the output html location for dotnet-stryker? - stryker

I am trying to run mutations over my .NET project using stryker and indeed able to do it successfully using the command :-
dotnet stryker -s Assessment.sln -p <Absolute path to csproj file>
I want to specify the target location where the html report should be generated. Currently I am getting it under
<Project test dir>/StrykerOutput/<timestamp>/reports/mutation-report.html
Does anyone have a solution to this? Thanks in advance.

No, regretfully it's not possible, you would need to copy it manually.
You can see the list of configuration options here.

Related

Exception generated when trying to generate jmeter HTML reports

I am trying to generate html reports through the jmeter non gui commands.
HTML reports are not getting generate and also seeing the below error with regards to the same.
COMMAND USED TO RUN:
jmeter -Jjmeter.save.saveservice.output_format=csv -Jjmeter.reportgenerator.apdex_statisfied_threshold=1500 -n -t D:\jmeter\v1_images_scenario.jmx -l D:\jmeter\images.jtl -e -o D:\jmeter\Reports\
ERROR MESSAGE:
Error generating the report:
org.apache.jmeter.report.dashboard.GenerationException: Cannot assign
"${jmeter.reportgenerator.apdex_satisfied_threshold}" to property
"set_satisfied_threshold" (mapped as "setSatisfiedThreshold"), skip it
Facing same error after setting the threshold as well .
Tried searching more on this , but couldn't be able to resolve the issue. Would be great if some once could help me on this.Thanks In Advance
Although the accepted answer resolved the OP's issue, I thought I would add an additional answer here as I ran in to this same behaviour and was unable to find a quick answer, thus wasting a lot of time searching, digging and the like.
In my scenario I had, mistakenly, changed from using -q <properties file> to -p <properties file>. What I didn't realize (at the time) is -q defines an additional properties file to be read, whereas -p overrides the jmeter.properties file. Thus when using -p I was missing properties that were required to correctly generate the dashboard. Incidentally, the "Summariser" (logger that periodically writes statistics to stdout) also stopped working, so that was an additional side effect. Interestingly my tests weren't failing, just the dashboard creation error and the missing Summariser.
Looking at the official documentation: https://jmeter.apache.org/usermanual/get-started.html#options this distinction is made, but other sites out there aren't so clear on that matter. So there you go...
You have a typo in your command, change it to look like:
jmeter -Jjmeter.save.saveservice.output_format=csv -Jjmeter.reportgenerator.apdex_satisfied_threshold=1500 -n -t D:\jmeter\v1_images_scenario.jmx -l D:\jmeter\images.jtl -e -o D:\jmeter\Reports\
i.e. change statisfied to satisfied
Going forward check the following files:
reportgenerator.properties
user.properties
jmeter.properties
For the following line:
jmeter.reportgenerator.apdex_satisfied_threshold=${jmeter.reportgenerator.apdex_satisfied_threshold}
and once found - delete or remove it, this way you will be able to generate the dashboard using default threshold of 500 if you don't override the property.
More information:
JMeter Properties Reference
Apache JMeter Properties Customization Guide

how to use json file in jenkins server?

I have make a job in jenkins in local and all work except sending an email at the end (but that is normal when I work in local). Now I need to migrate this job in my jenkins server.
During the build, I use a json file in the script shell "newman run ../../workflow-libs/testCollections" and I don't know how to use this (testCollection) file in my jenkins server.
Any help would be appreciated.
You said you are using shell scripting. So you can simply cd <Path Here> to change your directory. And in your case,
cd $WORKSPACE
newman run ../../workflow-libs/testCollections
You can simply do this. If you don't know how to create that file in jenkins server, Please login using jenkins cli and move or copy the file from local. Hope this helps.

Executing binary SQL file using SQLCMD from WiX

I'm trying to install SQL script(SSDT) using SQLCMD - as this script contains to many SSDT definitions and cannot be run by the WIX SQL extension.
i want my SQL script file to be binary(as i don't want it to stay on target machine)
how can i set the SQLCMD command to use the binary script (with -i)?
p.s.
i tried this blog:
http://neilsleightholm.blogspot.co.il/2008/08/executing-sqlcmd-from-wix.html##
but this code don't shows the link between the binary SQL file and the SCLCMD command.
can someone help me with the correct code?
this is the code i used, which did not work for me
<Binary Id="CreateSchema.sql" SourceFile="..\SQL\CreateSchema.sql" />
<CustomAction Id="sqlcmd.cmd"
Property="sqlcmd"
Value=""sqlcmd.exe" -S [DATABASE_SERVER]
-i "[#CreateSchema.sql]" -v var=SYSTEM_USER -o [INSTALLDIR]installSql.log" />
<CustomAction Id="sqlcmd"
BinaryKey="WixCA"
DllEntry="CAQuietExec"
Return="check"
Execute="deferred"
Impersonate="yes" />
<InstallExecuteSequence>
<Custom Action="sqlcmd.cmd" After="InstallFiles">NOT Installed</Custom>
<Custom Action="sqlcmd" After="sqlcmd.cmd">NOT Installed</Custom>
</InstallExecuteSequence>
the log file showed that -i parameter did not had any file name value:
MSI (s) (4C:6C) [09:58:15:610]: Executing op: CustomActionSchedule(Action=sqlcmd,ActionType=1025,Source=BinaryData,Target=CAQuietExec,CustomActionData="sqlcmd.exe" -S (local) -i "" -v var=SYSTEM_USER -o C:\installSql.log)
That's not how <Binary> works. The [#FileID] syntax is used to dynamically use the at runtime installation full path of a component's file.
Binaries are used typically as temporary extracted files for custom actions or, in this case, sql files among other things.
Consider looking into the SQL Extension in wix. As a minimal example take a look at this code.
Add the sql namespace xmlns:sql="http://schemas.microsoft.com/wix/SqlExtension"
<Binary Id="CreateSchema" SourceFile="..\SQL\CreateSchema.sql" />
<sql:SqlDatabase Id="MyDB" Database="[DATABASE]" Server="[DATABASE_SERVER]" />
And in a component you can add
<sql:SqlScript Id="CreateSchemaScript" BinaryKey="CreateSchema" ExecuteOnInstall="yes" Sequence="1" SqlDb="MyDB"/>
Here is a link to the SQL Schema definition with all the available elements. I haven't done much with the SQL Extension so you may need to do some reading to get a better idea of what you will need to do to accomplish creating your DB on install.
As i mentioned i wanted to use both SQLCMD - since my SQL script is SSDT format, and binary file(so file will be deleted in end of the install).
After looking for answers i understood that i cannot use the WiX [#filekey], as binary file will not be extracted as long as there is no custom action that is running - using it explicitly.
So in the end i understood that the best way is to extract the binary file by my self.
the steps i used in one single custom action are:
extract binary SQL script from MSI binary table.
save this file locally
run SQLCMD with -i and new file path(the one i save to)
delete the SQL file
I encounter some issues, worth mentioned, if you save the file to INSTALLDIR than the directory may not exist at the tun time of the custom action, so consider save it to temp folder or to create directory beforehand.

is it possible to start activemq with a configuration file that's not in one of the default locations?

All right all you activemq guru's out there...
Currently activemq require a configuration file before it runs. It appears from its debug output message:
$ ./activemq start -h
INFO: Using default configuration (you can configure options in one of these file: /etc/default/activemq /home/user_name/.activemqrc)
That you can only put it in one of those two locations. Anybody know if this is the case? Is there some command line parameter to specify its location?
Thanks!
-roger-
Yes, it is possible. Here are 3 possible answers.
If classpath is setup properly:
activemq start xbean:myconfig.xml
activemq start xbean:file:./conf/broker1.xml
Not using the classpath:
activemq start xbean:file:C:/ActiveMQ/conf/broker2.xml
reference:
http://activemq.apache.org/activemq-command-line-tools-reference.html
I have not been able to find the answer to this and I struggled with this myself for a while, but I've found a bit of a workaround. When you use bin/activemq create, you can create a runnable instance that will have its own bin, conf, and data directories. Then you have more control over that runnable insance and the .activemqrc becomes less important.
See this for detail on the create option : http://activemq.apache.org/unix-shell-script.html
Try this:
bin/activemq start xbean:/home/user/activemq.xml
Note that if the xml file includes other files like jetty.xml then it needs to be in that dir also.
If using a recent 5.6 SNAPSHOT you can set the env var ACTIVEMQ_CONF to point to the location where you have the config files
in the /bin/activemq script under # CONFIGURATION # For using instances, you can add or remove any file destinations you'd like.
Be very though since it ignores the others at the first occurrency of a file, read more here
Unix configuration
happy coding !

how to connect mysql databases in weka?

i want to use my mysql databases in weka in order to analysis data.
i download the mysql-connector-java-5.0.8-bin.jar and put that in weka folder in my program Files folder, and add this path to system variable path, but when i open the weka explorer and click the openDB, i don't know what should i write in the url textbox,
i don't know completely what should i do?
the error that i saw is:
problem connecting to database:
no suitable driver found for!
please give me a total guidance, thanks in advance.
add mysql-connector-java-5.1.12-bin.jar to CLASSPATH .
or put it in weka folder, navigate to weka installation folder and run command :
%java_home%/bin/java -Xmx300M -cp ".;weka.jar;mysql-connector-java-5.1.12-bin.jar;" weka.gui.GUIChooser
then click open DB and
fill in the proper user+password
put the url: jdbc:mysql://localhost:3306/DATABASENAME
Click Execute. The result window should show the results now.
For Weka 3.7.10, the classpath system environment variable is not took into account (at leat under Windows 7). The only working approach for me was to modify the RunWeka.ini file from the Weka installation folder as follows: the cp= setting was modified to:
cp=%CLASSPATH%;d:/Programs/jdbc/mysql-connector-java-5.1.26/mysql-connector-java-5.1.26-bin.jar
whereas only the %CLASSPATH%; setting was originally provided. Does not make much sense, but in worked.
find some introduction to WEKA and the environment variable:
http://weka.wikispaces.com/CLASSPATH
Copy mysql-connector-java-X.X.XX-bin.jar to /usr/share/java/
unizip /usr/share/java/weka.jar
edit: /usr/share/java/weka/experiment/DatabaseUtils.props
add:
jdbcDriver=com.mysql.jdbc.Driver
jdbcURL=jdbc:mysql://localhost:3306/test (with your server)
add shell
export CLASSPATH=/usr/share/java/mysql-connector-java-X.X.XX-bin.jar:
export CP=/usr/share/java/mysql-connector-java-X.X.XX-bin.jar::/usr/share/java/:/usr/shared/java/weka.jar
execute weka:
java -cp $CP -Xmx500m weka.gui.explorer.Explorer
Ready