Postman - Newman htmlextra report generation Issue - postman-collection-runner

I am running the collection json file in Newman and using htmlextra for report generation.
When I use this command I am not getting the report generated newman run "Telus Upgrade Service Testing.postman_collection.json" -e "Upgrade Services Variables.postman_environment.json" --reporter-htmlextra-export -k.
When I use this code, the report is getting generated in working directory newman run "Telus Upgrade Service Testing.postman_collection.json" -e "Upgrade Services Variables.postman_environment.json" --reporter-htmlextra-export -r htmlextra -k.
The problem is when I use fist command in cmd I am able to see the all the services are running but the report is not generated.
When I use 2nd command in cmd I am not seeing any services running but in backend, the services are running and the report got generated.
Kindly provide a solution for me, I want to see the services running in cmd and report should be generated.

In your first command, you're not specifying a reporter to use -r htmlextra so it will run the cli reporter as default but also, you're using the --reporter-htmlextra-export but not passing in a location to export the report file so there is not real need to add that arg.
newman run "Telus Upgrade Service Testing.postman_collection.json" -e "Upgrade Services Variables.postman_environment.json" --reporter-htmlextra-export -k
In the second command, to see the cli output, as well as the htmlextra report, you need to tell Newman to show it.
Use the -r cli,htmlextra arg in your command. You're not passing in a report file location in this command either so it will create this in the Newman directory. The --reporter-htmlextra-export flag is redundant if you're not wanting to change the export location.
newman run "Telus Upgrade Service Testing.postman_collection.json" -e "Upgrade Services Variables.postman_environment.json" --reporter-htmlextra-export -r htmlextra -k
All the options htmlextra options and how to use the reporter can be found here:
https://github.com/DannyDainton/newman-reporter-htmlextra#options

Related

Connect to Jenkins server via SSH

I was wondering if I can ssh a local instance of Jenkins. When I go to Jenkins CLI menu in the UI, there's a comment saying the below:
You can access various features in Jenkins through a command-line
tool. See the documentation for more details of this feature. To get
started, download jenkins-cli.jar, and run it as follows:
java -jar jenkins-cli.jar -s http://localhost:8080/ -webSocket help
So I tried it and it worked but it only gave a list of limited commands which I can execute. So I searched more and found I can use -ssh instead of -webSocket but I get the same result as -webSocket.
What I want to do is accessing the Jenkins bash so I can test my build scripts.
I'm trying
ssh 127.0.0.1 -p 23 // I set this port in the settings
but I keep getting :
shell request failed on channel 0
is it impossible what I'm trying to do? if not, how can I achieve it?

How can I deploy a IIB application using the command line like it is done by the toolkit (gui)?

I would like to execute exactly the same steps done by the IIB Toolkit deploy (right click the application and Deploy...to an integration server) but using the command line.
In my humble opinion it is an action that does trigger several steps/commands.
Below are the commands to deploy an application to integration server:
Create a bar file using mqsicreatebar command.
Deploy the created bar file from step 1 using mqsideploy command.
Use the below command:
mqsideploy node_name -e server_name -a <bar_file_location>_file.bar

JMeter - list of installed plugins

I am using JMeter 5.2, only via Command Line Mode.
For debugging purposes I need to get a list of all currently installed plugins for the JMeter version.
How I could achieve that?
You can use plugin manager using CLI:
command-line is simple:
PluginsManagerCMD <command> [<params>]
In your case execute status
PluginsManagerCMD status

ldap commands not recognized in windows command prompt

I am attempting to setup an LDAP server.
I installed ApacheDS and I was going through the user guide. I am trying to change the default admin password. I know I can use the Apache Directory Studio to do this, but I am required to use the command line to setup and maintain the LDAP server I create.
I found this
and it helped by showing how to use an ldif file to modify the default password.
However when I run
ldapmodify -h localhost -p 10389 -D "uid=admin,ou=system" -f conf-modify.ldif
I get the message:
'ldapmodify' is not recognized as an internal or external command, operable program or batch file.
Is there an LDAP package for windows command line tools or is there a specific directory that the ldap command must be executed from in ApacheDS
I am currently running the command from the ApacheDS install directory C:\Program Files\ApacheDS
I have been using OpenDJ and their tools. You do not need to run the LDAP server to be able to run their LDAP tools.
Runs on any(?) Java 7 or greater platform.
Open any cmd prompt and add add this command
set path=%path%;E:\Softwares\OpenLDAP\bin
and after that run your command
ldapmodify -h localhost -p 10389 -D "uid=admin,ou=system" -f conf-modify.ldif
I Hope it helps you.,
An old article, perhaps still useful for ApacheDS users.
if you have found your bin folder with dsadm.exe usw.,
then you will find your ldapsearch.exe in a parallel folder.
dsee7:
*---bin
| dsadm.exe
|
*---dsrk
+---bin
ldapsearch.exe
ldapmodify.exe
WARNING:
call pls.
ldapmodify -h
In order to see the difference between openldap and ApacheDS.
It is not working with openldap syntax.
Have a fun with experimenting. (rulez Shadows)
Hint you will see the same syntax in suchlogs in your Apache Directory Browser

Script Karaf shell commands?

I need to issue Karaf shell commands non-interactively, preferably from a script. More specifically, I need to tell Karaf to feature:install a set of features in an automated way.
# Attempt to install a feature in a way I could script
bash> bin/karaf feature:install myFeature
# Drops me into Karaf shell
karaf> feature:uninstall myFeature
Error executing command: Feature named 'myFeature' is not installed
# Feature wasn't installed
Is this possible? Is there a different way of solving this issue (automated install of a set of Karaf features) that I'm missing?
With bin/karaf you start Karaf with a login prompt, if you want to start Karaf so you can issue commands you first need to start Karaf in server mode. For this use the bin/start shell script. Now you can use either the bin/client or the bin/shell commands to communicate with Karaf in a headless mode.
For example:
./bin/client list
START LEVEL 100 , List Threshold: 50
ID | State | Lvl | Version | Name
----------------------------------------------------------------------------------
72 | Active | 80 | 0 | mvn_org.ops4j.pax.web.samples_war_4.1.0-SNAPSHOT_war
This should work for all versions of Karaf already (maybe not the 2.2.x line ;-) )
If the version you're using is a 3.0.x or higher you might need to add a user to the command.
./bin/client -u karaf list
To issue Karaf shell commands not-interactively, preferably from a script you can also use the Karaf client (scroll down to "Apache Karaf client"). To install features I use command like
/opt/karaf/bin/client -r 7 "feature:install http; feature:install webconsole"
The -r switch allows to retry the connection if the server is not up yet (I use it in a Docker script).
It's possible to issue non-interactive Karaf shell commands using sshpass if keeping the password secrete isn't important.
sshpass -p karaf ssh -tt -p 8101 -o StrictHostKeyChecking=no karaf#localhost feature:install odl-l2switch-switch-ui
Working example in OpenDaylight's Vagrant-based L2Switch Tutorial.
Late to the party, but this problem can easily be solved using the Features Boot configuration, located in the etc/org.apache.karaf.features.cfg file.
According to the following link https://karaf.apache.org/manual/latest/provisioning
A boot feature is automatically installed by Apache Karaf, even if it has not been previously installed using feature:install or FeatureMBean.
There are 2 main properties of this file, the featuresRepositories and featuresBoot.
featuresRepositories contains a list (comma-separated) of features repositories (features XML) URLs.
featuresBoot contains a list (comma-separated) of features to install at boot.
Note that once you update this file, Karaf will attempt to install the features listed in the featuresBoot configuration every time it starts. So if all you are looking to automate is installing features (as per the original question), then this is a great option.
Another option is to use Expect.
This Expect script from OpenDaylight's CI installs and verifies a Karaf feature. Here's an excerpt:
# Install feature
expect "$prompt"
send "feature:install odl-netvirt-openstack\r"
expect {{
"Error executing command: Can't install feature" {{
send_user "\nFailed to install test feature\n"
exit 1
}}
}}
So the general practice is to install the feature, then loop on a bundle:list | grep bundleName to see if the bundles you need are installed. Then you continue on with your test case.

Resources