Jenkins概念及安装配置教程(四)

news/2024/5/5 14:45:43

什么是Jenkins管道?

Jenkins 中的管道是一组按特定顺序相互关联的作业(或事件)。Jenkins Pipeline 是一组或一套插件,为将持续交付管道实施和集成到 Jenkins 中提供支持。

Pipeline 还提供了一组工具,可用于通过“Pipeline Domain-Specific Language (DSL)”语法将简单和复杂的交付管道建模为“代码”。

Jenkins 管道中的每项工作都对一个或多个事件有一定的依赖性。Jenkins 中的持续交付管道由四个状态组成——构建、部署、测试和发布。这些状态中的每一个都包含按顺序执行的事件。

什么是Jenkinsfil?

现在您了解了什么是 Jenkins 管道,我们可以更深入地研究这个概念。Jenkins Pipeline 的完整定义被写入一个名为 Jenkinsfile 的文本文件中。它包含运行 Jenkins 管道所需的步骤。“管道即代码”可以使用 Jenkinsfile 实现,领域特定语言 (DSL) 用于定义它。

Jenkinsfile 也可以提交到项目的源代码控制存储库。使用 Jenkinsfile,CD 管道也被视为应用程序的一部分,与任何其他代码一样进行版本控制、提交和审查。

Jenkinsfile 的一些主要优点是:

  • 单个 Jenkinsfile 可用于为所有分支创建流水线构建过程并执行拉取请求。
  • 管道中的实现可以像普通源代码一样进行审查。
  • 管道的审计跟踪。
  • Pipeline 的单个源可以由与项目关联的多个成员查看和编辑。

尽管可以在 Web UI 中或使用 Jenkinsfile 定义流水线,但建议在 Jenkinsfile 中定义什么是 Jenkins 流水线,并在源代码控制存储库中进行维护。

定义 Jenkinsfile 的语法

要定义什么是 Jenkins 管道,可以使用以下类型的语法编写 Jenkinsfile:

A。声明性的

Declarative Pipeline 是 Jenkins Pipeline 的最新功能,它使阅读和编写 Pipeline 代码变得更加容易。与管道的脚本语法不同,声明语法有助于以简单的方式控制管道的不同方面。

b. 脚本化

脚本化流水线是一种更传统的将 Jenkins 流水线编写为代码的方式。它使用传统的基于 Groovy 的语法。Jenkins 的 Web UI 通常用于在 Jenkinsfile 中编写脚本化管道。

Jenkins 管道的重要概念

继续介绍什么是 Jenkins 管道,如果您打算使用 Jenkins 管道,这里有一些需要很好理解的基本概念:

A。管道

管道由一组编写为代码的指令组成。它定义了整个构建过程,理想情况下包括构建、测试和交付应用程序的不同阶段。

b. 节点

Node 是一台机器,它是 Jenkins 环境的一部分。Jenkins 管道在节点块上执行,该节点块通常是脚本化管道语法的一部分。

C。阶段

Jenkins 管道中的阶段由一个独特的任务子集组成,例如构建、测试、部署等。许多插件使用阶段块来提供 Jenkins 状态(和进度)的可视化。

d. Step

Step 是一个单一的任务,它告诉 Jenkins 到底需要做什么。例如设置环境变量可以一步完成,执行构建命令也可以一步完成。总的来说,一个 Jenkins Pipeline 由一系列步骤组成。

使用 Jenkins 管道的优势

Jenkins Pipeline 有助于在 Jenkins 上添加一套丰富的自动化工具。因此,Jenkins 可用于简单的持续集成以及全面的 CD 管道。

这些是使用 Jenkins 管道的一些主要原因:

  • 由于 Jenkins Pipeline 是作为代码实现的,因此可以在源代码控制存储库中进行检查。团队可以查看、编辑以及迭代交付管道。
  • Jenkins 管道非常健壮。如果服务器发生计划外重启,管道会自动恢复。
  • 流水线过程可以暂停并等待来自用户的任何输入。
  • 管道用途广泛,因为它们可用于实现复杂的 CD 要求,包括并行执行工作。
  • Jenkins Pipelines 可由插件开发人员和用户使用 Pipeline Shared Libraries 进行扩展。

声明式管道样本

这是声明式管道的一个简单示例-

pipeline {
    agent any
    stages {
        stage('Build') { 
            steps {
            }
        }
        stage('Test') { 
            steps {
            }
        }
        stage('Deploy') { 
            steps {
            }
        }
    }
}

流水线块定义了通过定义的流水线完成的工作。下面列出了该管道的一些基本细节:

  1. Agent ‘any’ 表示流水线阶段可以在任何可用的 Agent 上执行。
  2. “构建”、“测试”和“部署”是管道中的不同阶段。它们中的每一个都将按顺序运行。
  3. “步骤”中的说明指示需要作为特定“阶段”的一部分执行的工作。例如,sh ‘build command’ 可用于在 ‘Build’ 阶段触发构建命令。

我们没有介绍脚本化管道,因为它超出了本博客的范围。在什么是 Jenkins 博客的后面部分,我们将演示 Declarative Pipeline 在 Maven 项目中的用法。

Jenkins演示示范

测试场景

  1. 导航到https://lambdatest.github.io/sample-todo-app/
  2. 选择前两个复选框
  3. 在 ID 为“sampletodotext”的文本框中输入“Happy Testing at LambdaTest”
  4. 选择“添加”按钮并检查文本是否已添加

执行

TestNG 测试框架用于执行[Selenium 测试自动化]

package org.selenium4;

import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import java.util.Map;
import java.util.*;
import io.github.bonigarcia.wdm.WebDriverManager;

public class CrossBrowserTest {
    protected static ChromeDriver driver;
    String URL = "https://lambdatest.github.io/sample-todo-app/";

    @BeforeClass
    public void testSetUp() {
        WebDriverManager.chromedriver().setup();
        driver = new ChromeDriver();
    }

    @Test
    public void test_Selenium4_ToDoApp() throws InterruptedException {
        driver.navigate().to(URL);
        driver.manage().window().maximize();

        try {
            /* Let's mark done first two items in the list. */
            driver.findElement(By.name("li1")).click();
            driver.findElement(By.name("li2")).click();

            /* Let's add an item in the list. */
            driver.findElement(By.id("sampletodotext")).sendKeys("Happy Testing at LambdaTest");
            driver.findElement(By.id("addbutton")).click();

            /* Let's check that the item we added is added in the list. */
            String enteredText = driver.findElement(By.xpath("/html/body/div/div/div/ul/li[6]/span")).getText();
            if (enteredText.equals("Happy Testing at LambdaTest")) {
                System.out.println("Demonstration of Jenkins is complete");
            }
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }

    @AfterClass
    public void tearDown() {
        if (driver != null) {
            driver.quit();
        }
    }
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.example</groupId>
    <artifactId>org.selenium4.SeleniumGrid4</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <!-- https://mvnrepository.com/artifact/com.github.lambdatest/lambdatest-tunnel-binary -->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.9.10</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>4.0.0-alpha-6</version>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.8.8</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-chrome-driver</artifactId>
            <version>4.0.0-alpha-6</version>
        </dependency>
        <dependency>
            <groupId>io.github.bonigarcia</groupId>
            <artifactId>webdrivermanager</artifactId>
            <version>RELEASE</version>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-nop -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-nop</artifactId>
            <version>1.7.28</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12.4</version>
            </plugin>
        </plugins>
    </build>
</project>

我们已经使用 IntelliJ 进行开发。您可以使用 Eclipse 或任何首选的 IDE 进行开发。

代码检查

@BeforeClass 注释下的实现设置了 Chrome 浏览器的浏览器功能。

@BeforeClass
    public void testSetUp() {
        WebDriverManager.chromedriver().setup();
        driver = new ChromeDriver();

测试用例test_Selenium4_ToDoApp()是在[@test]  注解下实现的。find_element_by_name()、driver.find_element_by_id() 等 Selenium 方法用于定位需要执行操作的 Web 元素。click()、sendKeys() 等 Selenium 命令应用于必要的 Web 元素。

@Test
    public void test_Selenium4_ToDoApp() throws InterruptedException {
        driver.navigate().to(URL);
        driver.manage().window().maximize();

    try {
            ...............
            ...............
        }

Jenkins 中的声明式管道示例

设置项目

执行以下步骤来设置项目:

  1. 登录 Jenkins 后创建一个“新项目”。输入项目名称“Jenkins Declarative Pipeline Demonstration”。选择管道作为项目类型。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-7aENjage-1685347396117)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/38db6149da714d06a9add480825cb9b2~tplv-k3u1fbpfcp-zoom-1.image)]

  1. 通过导航到 pluginManager ie localhost:/pluginManager/ 安装以下 Jenkins 插件
  • Blue Ocean 插件 – https://plugins.jenkins.io/blueocean
  • Blue Ocean 管道编辑器插件 – https://plugins.jenkins.io/blueocean-pipeline-editor
  • 配置为代码插件 – https://plugins.jenkins.io/config-file-provider
  • JUnit 插件 – https://plugins.jenkins.io/junit/
  • HTML Publisher 插件 – https://plugins.jenkins.io/htmlpublisher
  • Maven 集成插件 – https://plugins.jenkins.io/maven-plugin
  • Maven 信息插件 – https://plugins.jenkins.io/maven-info
  • Maven SureFire 插件 – https://maven.apache.org/surefire/maven-surefire-plugin/
  • Blue Ocean 插件的管道实现 – https://plugins.jenkins.io/blueocean-pipeline-api-impl
  • 管道 Maven 集成插件 – https://plugins.jenkins.io/pipeline-maven
  1. 通过导航到“系统配置”部分中的“配置系统”来配置全局设置和路径(针对 Java 和 Maven)。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-puS4n15Y-1685347396118)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/841b83f7c610448cb0a06a4e17c94afa~tplv-k3u1fbpfcp-zoom-1.image)]

导航到标题为“全局属性”的配置项并添加以下环境变量:

  • JAVA_HOME - < 安装 JDK 的位置 >
  • MAVEN_HOME – < Maven 安装位置 >

在我们的例子中,条目如下:

  • JAVA_HOME – C:\Program Files\Java\jdk1.8.0_251
  • MAVEN_HOME – C:\apache-maven\apache-maven-3.6.3\

单击应用并保存。

  1. 添加的环境变量将在管道中使用。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ZEwxrGcq-1685347396118)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ac5d05edde0f4b7a9d3a27031d6fab05~tplv-k3u1fbpfcp-zoom-1.image)]

在系统配置部分添加这些环境变量使设置公开(即它可以在 Jenkins 的不同作业中使用)。

有了这个,我们就可以开始编写我们的第一个声明式管道了!

编写声明式管道

在名为“Jenkins Declarative Pipeline Demonstration”的项目中,单击 Configure。在项目配置窗口中,单击管道选项卡。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Bc7Pi0VQ-1685347396119)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/4897cb44fb674ce7ba000d03f3038c05~tplv-k3u1fbpfcp-zoom-1.image)]

在管道“定义”下,选择管道脚本。将以下 Jenkinsfile 的内容粘贴到脚本框中。单击应用并保存。

pipeline {
    agent any
    tools {
        maven 'MAVEN_3.6.3'
        jdk 'JDK_1.8.0_251'
    }
    stages {
        stage('Build') {
            environment {
                PROJECT_DIR = "C:\Users\Lenovo\IdeaProjects\CrossBrowserTest"
            }
            steps {
                echo 'maven clean'
                bat ' mvn -f %PROJECT_DIR%\pom.xml clean install'  
            }
        }
    }
    post {
            success {
                        echo 'Now Archiving'
                        junit allowEmptyResults: true, testResults: '**/surefire-reports/*.xml'
                }
        }
}

管道演练

  1. 这个特定的 Jenkins 作业可以在任何代理上运行。
pipeline {
    agent any
  1. 定义工具指令部分列出了必须自动安装的工具。PATH 变量中也添加了同样的内容。如果指定了 agent none,则此部分将被忽略。
tools {
        maven 'MAVEN_3.6.3'
        jdk 'JDK_1.8.0_251'
    }

在我的机器上,安装了 JDK 版本 1.8.0_251 和 Maven 版本 3.6.3。因此,在 tools 指令下添加了分别指向 Maven 和 JDK 版本的别名 maven 和 jdk。

  1. 管道中只有一个阶段“构建”。使用 environment 指令,我们定义了一个指向包含 Java 项目的目录的环境变量。定义的环境变量(即PROJECT_DIR)将可用于所有步骤或特定于阶段的步骤,因为它是在“构建”阶段中定义的。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-7HGZ3wbU-1685347396119)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/e2188859a3c14590a6d0c5e4c6d62572~tplv-k3u1fbpfcp-zoom-1.image)]

stage('Build') {
            environment {
                PROJECT_DIR = "C:\Users\Lenovo\IdeaProjects\CrossBrowserTest"
            }
  1. 这一步对于定义什么是 Jenkins Pipeline 是最重要的,因为在此步骤中执行构建。命令 mvn clean install 在项目目录中的 pom.xml 上执行。由于我们的构建机器是 Windows,因此我们通过 bat(或批处理)调用构建命令。
steps {
                echo 'maven clean'
                //ABC indicates the folder name where the pom.xml file resides
                bat ' mvn -f %PROJECT_DIR%\pom.xml clean install'  
            }
  1. 在“发布”指令下添加了构建后操作。由于操作处于“成功”状态,因此仅当构建过程成功时才会调用该操作。junit 插件用于准备测试报告。
post {
            success {
                        echo 'Now Archiving'
                        junit allowEmptyResults: true, testResults: '**/surefire-reports/*.xml'
                }
        }
}

将流水线添加到 Jenkinsfile 后,单击“打开蓝海”链接运行作业。或者,您也可以通过单击“立即构建”选项来发布构建,在这种情况下您无需安装 Blue Ocean 插件。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-rmeTBLAr-1685347396120)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/c417ea46d74744ceb1bfbf2a9a60b48c~tplv-k3u1fbpfcp-zoom-1.image)]

单击“运行”以运行该作业。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-4lhV5xZy-1685347396120)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/e1cf131ddb79473cbe93a8eda5da7845~tplv-k3u1fbpfcp-zoom-1.image)]

如下图,工具(即JDK和Maven)配置成功。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-gUyynLDZ-1685347396121)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/7b6ad67cfebe44d9bbb9095a8ad09879~tplv-k3u1fbpfcp-zoom-1.image)]

步骤“构建”和构建后操作运行没有任何问题。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ULESYEtZ-1685347396121)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/6c71ff39bdba45129cbee4d9c330dcaf~tplv-k3u1fbpfcp-zoom-1.image)]

这是当前 Jenkins 流水线的 Stage View。声明性工具安装阶段在 2 秒内完成,构建阶段用时 3 分 25 秒。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-9zcDEbmZ-1685347396121)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/b8b09fe62b9e43e088cde68613421800~tplv-k3u1fbpfcp-zoom-1.image)]

您可以将鼠标悬停在任何阶段并查看该特定阶段的日志。如控制台输出所示,测试场景已成功执行,其中实例化了 Chrome WebDriver 并在被测网页上执行了所需的操作。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-k2V3HvpX-1685347396122)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/9266b466b04b4417bcee6d1db1a905bb~tplv-k3u1fbpfcp-zoom-1.image)]

控制台日志如下:

[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @ org.selenium4.CrossBrowserTest ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\Lenovo\IdeaProjects\CrossBrowserTest\target\test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ org.selenium4.CrossBrowserTest ---
[INFO] Surefire report directory: C:\Users\Lenovo\IdeaProjects\CrossBrowserTest\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.selenium4.CrossBrowserTest
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@299a06ac
Starting ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}) on port 45010
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1595945821.200][WARNING]: Timed out connecting to Chrome, retrying...
Jul 28, 2020 7:47:03 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Demonstration of Jenkins is complete
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 93.655 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

Jenkins 中的 Maven 项目示例

设置项目

执行以下步骤来设置 Maven 项目:

  1. 登录 Jenkins 后创建一个“新项目”。输入项目名称“Jenkins Maven Demonstration”。选择 Maven 项目作为项目类型,然后单击确定。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-NXdWCHp3-1685347396122)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/e0c45b9de0e7454db1872a420f3b3169~tplv-k3u1fbpfcp-zoom-1.image)]

  1. 通过导航到 pluginManager 即http://localhost: < port_associated_with_Jenkins >/pluginManager/ 安装以下 Jenkins 插件。还为 Jenkins Pipeline 演示安装了同一组插件。
  • Blue Ocean 插件 – https://plugins.jenkins.io/blueocean
  • Blue Ocean 管道编辑器插件 – https://plugins.jenkins.io/blueocean-pipeline-editor
  • 配置为代码插件 – https://plugins.jenkins.io/config-file-provider
  • JUnit 插件 – https://plugins.jenkins.io/junit/
  • HTML Publisher 插件 – https://plugins.jenkins.io/htmlpublisher
  • Maven 集成插件 – https://plugins.jenkins.io/maven-plugin
  • Maven 信息插件 – https://plugins.jenkins.io/maven-info
  • Maven SureFire 插件 – https://maven.apache.org/surefire/maven-surefire-plugin/
  • Blue Ocean 插件的管道实现 – https://plugins.jenkins.io/blueocean-pipeline-api-impl
  • 管道 Maven 集成插件 – https://plugins.jenkins.io/pipeline-maven
  1. 现在,转到 Build 选项卡并在 Root POM 和 Goals & Options 中输入详细信息。在Root POM中,输入项目pom.xml所在目录的位置。我们在目标和选项中输入干净测试,以便执行干净构建。
  • 根 POM – < 项目目录 >\pom.xml
  • 目标和选择——清洁测试

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-nJcAo1wM-1685347396122)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/1fa9076c25f74cfb9b3c8aaf987c19cf~tplv-k3u1fbpfcp-zoom-1.image)]

Post build,如果需要测试报告,可以在Post Steps选项卡中添加相关的‘Add post-build step’。

  1. 单击应用并保存。单击“立即构建”(或从“Open Blue Ocean”中选择相同的项目)开始构建过程。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-05uKaqWp-1685347396123)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/7847d6cc60254421abe399aa4b286b93~tplv-k3u1fbpfcp-zoom-1.image)]

如控制台日志中所示,测试已成功执行。

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ org.selenium4.CrossBrowserTest ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Lenovo\IdeaProjects\CrossBrowserTest\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @ org.selenium4.CrossBrowserTest ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\Lenovo\IdeaProjects\CrossBrowserTest\target\test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ org.selenium4.CrossBrowserTest ---
[INFO] Surefire report directory: C:\Users\Lenovo\IdeaProjects\CrossBrowserTest\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.selenium4.CrossBrowserTest
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@299a06ac
Starting ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}) on port 39047
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1595948996.334][WARNING]: Timed out connecting to Chrome, retrying...
[1595949004.487][WARNING]: Timed out connecting to Chrome, retrying...
Jul 28, 2020 8:40:15 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Demonstration of Jenkins is complete
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 94.51 sec
Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

http://www.niftyadmin.cn/n/393865.html

相关文章

Rust每日一练(Leetday0020) 最后单词的长度、螺旋矩阵II、排列序列

目录 58. 最后一个单词的长度 Length of Last Word &#x1f31f; 59. 螺旋矩阵 II Spiral Matrix II &#x1f31f;&#x1f31f; 60. 排列序列 Permutation Sequence &#x1f31f;&#x1f31f;&#x1f31f; &#x1f31f; 每日一练刷题专栏 &#x1f31f; Rust每日…

计算机网络第一章——计算机系统结构(下)

提示&#xff1a;总角之宴&#xff0c;言笑晏晏。信誓旦旦&#xff0c;不思其反。反是不思&#xff0c;亦已焉哉。 文章目录 1.2.1 分层结构&#xff0c;协议&#xff0c;接口和服务为什么要有分层&#xff1f;怎么分层正式认识分层结构概念总结 1.2.2 OSI 参考模型ISO参考模型…

Java企业级信息系统开发学习笔记14 Spring Boot(使用Spring Initializr方式构建Spring Boot项目)

文章目录 一、使用Spring Initializr方式构建Spring Boot项目&#xff08;一&#xff09;创建Spring Boot项目&#xff08;二&#xff09;创建控制器&#xff08;三&#xff09;运行入口类&#xff08;四&#xff09;访问Web页面&#xff08;五&#xff09;修改访问映射路径 一…

python基本操作3(速通版)

目录 一、字典 1.字典定义 2.字典的访问 3.字典的遍历 4.字典删除 5.字典练习 6.有序字典 7.集合 8.类型转化问题 9.公共方法 二、列表推导式 1.基本操作 2.在循环中使用if 三、组包和拆包 1.组包拆包基本应用 2.拆包的字典问题 四、python函数的一些特性 1.函…

文件与文件系统的打包、压缩、备份

Linux常见的压缩指令 常见压缩文件拓展名 *.Zcompress 程序压缩的文件*.zipzip 程序压缩的文件*.gzgzip 程序压缩的文件*.bz2bzip2 程序压缩的文件*.xzxz 程序压缩的文件*.tartar 程序打包的数据&#xff0c;未经压缩*.tar.gztar 程序打包的数据&#xff0c;并经过gzip的压缩…

局域网技术

共享信道的分配技术是局域网的核心技术&#xff0c;而这一技术又与网络的拓扑结构和传输介质有关。 拓扑结构&#xff1a; 1.总线型拓扑&#xff1a; 总线一种多点广播介质&#xff0c;所有的站点通过接口硬件连接到总线上。 传输介质主要是同轴电缆&#xff08;基带和宽带…

Linux 实操篇-网络配置

Linux 实操篇-网络配置 Linux 网络配置原理图 查看网络IP 和网关 查看虚拟网络编辑器和修改IP 地址 查看网关 查看windows 环境的中VMnet8 网络配置(ipconfig 指令) 查看linux 的网络配置ifconfig ping 测试主机之间网络连通性 基本语法 ping 目的主机&#xff08;功能描述…

Anolis OS8 磁盘扩容

最近学习的时候&#xff0c;使用Vmware安装了AnolisOS8进行测试&#xff0c;随着学习的深入&#xff0c;组件安装越来越多&#xff0c;磁盘不够用了&#xff0c;但是安装的组件又太多&#xff0c;重新装个虚拟机又得重新装各种组件。所以决定对磁盘进行扩容&#xff0c;在这里做…