Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Problems encountered by ant in sending email

Shulou Source: shulou.com Published: 2022-06-03 06:36:14 11月23日 Update

1. The jmeter+ant+jenkins environment is built on the local environment. If you encounter the problem that the email cannot be sent, the solutions are as follows:

Add four jar packages to the lib under the ant installation package: mail-1.4.7.jar,commons-email-1.2.jar,activation.jar,ant-javamail.jar, see the attachment or download it yourself.

Then add something related to sending email to build.xml:

The interface test report should be added at the place where it is executed:

So that the mail can be sent.

two。 After sending the email, two problems were found, one of which was that the report showed: Date report: date not defined

Another problem is that the unfold and shrink buttons are not displayed, showing a rupture.

1 "the first solution to the problem is to add a line to the build.xml (the colored line in the following code), which will be displayed as a time, provided that the time is defined in the build.xml:

2 "the second problem is that collapse.png and expand.png are local, so after sending an email, you can't get the picture. Upload the two pictures online (Qzone, Baidu Cloud, etc., or put them on the company's image server), copy the image address, go to the extras folder of the jmeter installation package, and open jmeter-results-detail-report_21.xsl for editing. (when editing, you find that you do not have write permission. Write permissions can be given with the chmod command first.

The following four areas will be changed:

{if (document.getElementById (details_id+ "_ p_w_picpath") .src.match ("here changed to the address of the collapse image") {document.getElementById (details_id+ "_ p_w_picpath") .src = "here changed to the address of the expand image"; expand (details_id);} else {document.getElementById (details_id+ "_ p_w_picpath"). Src = "here change the address of the collapse image" Collapse (details_id);} _ javascript:change ('page_details_')

expand/collapse

Page_details__p_w_picpath

Attachment: http://down.51cto.com/data/2366488

Tags: Pictures questions mail addresses places reports permissions environment attachments China plus one line code company premises methods commands buttons interfaces files folders Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Tech Info Microsoft Shulou Technology macOS