how to send the emailable-report to specific recipient in TestNg framework - selenium-webdriver

After executing the test suit through Testng framework, I don't have any idea on how to send the report through email. How to use emailable-report.html to be send a specific recipient?

you need to use testngxslt plugin and integrate ANT when generated a build.xml file BY using
javax mailjar and javax activation jar trying to send report as zip file.

Write a java class to send email using javax and then set it as a final task in your build.xml.( if you are using ant to build and run you can use this, it works fine for us)

Related

using ms-word protocol from a react application to open a docx in MS word

Currently trying to allow users to click a button in a react application to open a .docx document in their local version of word.
Have a C# rest endpoint setup that will return a document as a FileStreamResult if you pass it a document id.
Wondering if anyone has accomplished this before as I was eventually hoping that i could pass an endpoint in to the save parameter so once saved it would upload back to the server.
Tried running the ms-word command however it comes up with "this action couldn't be performed because office doesn't recognize the command it was given". ms-word:ofe|u|<>
Thanks in advance.

How to send Allure Reports in Email using Jenkins server

I have created a Automation using Rest Assured, TestNg, Gradle and Allure reports. Now i am able to generate Allure reports , But i am looking something where i can send Allure reports in Email. Whether this is any plugin is available or any latest deployment is going on
First you need to install Email Extension plugin in your Jenkins. You can also use the default Jenkins mail but I prefer the Email Extension plugin since it's more configurable.
Second you need smtp server to send email from Jenkins. If you have one then cool otherwise create one. (If you are using gmail then your smtp server is smtp.gmail.com by default)
Third is you need to configure Jenkins. Open your Jenkins Dashboard > Manage Jenkins > Configure Systems. Then scroll down to Email Extension. If you have decided to use the default Email the scroll down to Email and enter the details and save.
Fourth you need to add the following code to your existing pipeline.
stage('Email Report') {
// Change the recipent address
sh "zip -r allure-report.zip allure-report"
def mailRecipients = "therecipient#mail.com"
env.ForEmailPlugin = env.WORKSPACE
if(fileExists('allure-report.zip')){
emailext(
to: "${mailRecipients}",
from: "sender#mail.com",
subject: "Allure Report",
body: "PFA",
attachmentsPattern: 'allure-report.zip'
)
} else{
echo("COULD NOT FIND FILE TO ATTACH")
}
}
Fifth the recipient need to download the zip attachment and execute allure serve to see the reports and dashboards.
It's worth noting that the best way to serve allure report is to upload in some common place for example in jira, confluence etc.

Nagios3 configuration for sending simple text message on some port

I am developing an application and decided Nagios3 for performing monitoring stuff. But I am stuck at two points. I am using check_http plug-in for monitoring load on my service api. Now I want to perform below tasks.
I need to set a threshold in check_http for performing some task after crossing that threshold. I tried below command
'check_command check_nrpe_1arg!check_service_api'
but it only tells me the load, not any threshold is set. while below one doesn't work.
'check_command check_service_api!100!200'
I need to send simple text message on some port(my application).
I am new to Nagios, so please help me figuring out the solution except email notification stuff.
There is a check command that you can download called "notify_sms" that integrates with an API server hosted by a company called Esendex. They charge for their service but it works well.

how to import web sessions recorded using fiddler in to jmeter?

I use fiddler to record a web session. I export the recorded sessions into various formats like Curl Script, WCAT Script, Meddler Script, Html5 script, visualStudio web test.
How to import the recorded session into jmeter?
JMeter appears to only support a proprietary XML format called jmeterTestPlan. While it would probably be possible to develop a Fiddler exporter that would save to that format, it's not clear that it would be worthwhile. Most of what you might want to do with jMeter can probably be done in Fiddler itself, and if your goal is to use jMeter for everything except the initial capture, you can instead use the proxy recorder included in the jMeter product instead of Fiddler.

How can I script WordPress for non-GUI automated Pages/Posts-import?

This is probably a "cannot see the forest because of the trees" situation,
but how do I create a script which does the automated import of Posts/Pages, without a hook in the WP Website-GUI (e.g. in Theme's functions.php). It should be standalone triggerable by calling the script name via webserver.
via this API-call wp_insert_post()
You want to use the WordPress API (http://codex.wordpress.org/XML-RPC_wp) to connect. You can do this with almost any scripting language, but since you mention running it on the webserver, and WordPress is written in PHP, we'll go with that language for now.
Check out this tutorial:
http://life.mysiteonline.org/archives/161-Automatic-Post-Creation-with-Wordpress,-PHP,-and-XML-RPC.html
He shows example of how to create a script that will insert a post into your WordPress blog. The script can be given execute permissions and ran via the command line or a cron job.
You will have to code the logic to get the post from wherever your data is stored, though.

Resources