【测试效率提升技巧】xmind测试用例转换为excel工具使用手册

【测试效率提升技巧】xmind测试用例转换为excel工具使用手册

    • 一、前置环境配置
    • 二、执行
      • Xmind2testcase的转换方法
        • 1.在控制台输入xmind2testcase [path/xmind文件路径] [-csv] [-xml] [-json],例:xmind2testcase /root/homin/XX测试点.xmind -csv ##在当前目录下会转换为对应的csv类型文件。
        • 2.在控制台输入 xmind2testcase webtool 8000 ,定义好本地端口后访问http://127.0.0.1:8000/,可通过web端进行文件转换,之后可通过点击“Get Zentao CSV / Get TestLink XML / Go Back”,生成对应的文件类型。
    • 三、xmind书写模板和规则
    • 四.xmind2testcase转换库针对禅道代码改良
      • 4.1修改优先级,修改zentao.py
      • 4.2.修改用例类型,修改zentao.py
      • 4.3.修改适应阶段,修改zentao.py
      • 4.4.导出文件有空行,修改zentao.py
      • 4.5.用例步骤、预期结果序号后多一个空格,修改zentao.py
      • 4.6.每导出一个用例步骤和预期结果都会多一个换行符,修改zentao.py
      • 4.7.填写默认关键词,修改zentao.py
      • 4.8.去掉用例标题中的空格,修改parser.py
      • 4.9.增加需求字段
        • 4.9.1修改metadata.py
        • 4.9.2 修改utils.py
      • 4.10.把原先的产品名(中心主题)改为功能模块名,输出文件名字一致,修改parser.py
    • 五.修改xmind2testcase支持导出xlsx文档
      • 5.1 使用pandas库
        • 5.1.1在zentao.py文件中添加函数:xmind_to_zentao_xlsx_file_by_pandas,如下:
        • 5.1.2在application.py中添加路由
        • 5.1.3在index.html添加xlsx的访问路径
        • 5.1.4在ipreview.html添加xlsx的访问路径
      • 5.2 使用openpyxl
    • 六.编写规则

一、前置环境配置

1.在命令行执行pip install xmind2testcase -U
2.到python中xmind2testcase的安装路径(我的路径是D:\python\Lib\site-packages\xmind2testcase)下新建一个文件夹,命名为web
3.在命令行cd到刚刚创建的web文件夹,执行pip freeze > requirements.txt
4.命令行执行pip install -r requirements.txt -U

PS:请尽量使用xMind8 Update9版本编写测试用例,否则可能出现无法转换的情况

二、执行

运行python安装目录下的application.py文件(我的文件位置在D:\python\Lib\site-packages\webtool\application.py)
命令行会显示本地生成的网页网址,直接复制到浏览器进入即可
在这里插入图片描述
实现效果如下:
在这里插入图片描述

Xmind2testcase的转换方法

1.在控制台输入xmind2testcase [path/xmind文件路径] [-csv] [-xml] [-json],例:xmind2testcase /root/homin/XX测试点.xmind -csv ##在当前目录下会转换为对应的csv类型文件。

2.在控制台输入 xmind2testcase webtool 8000 ,定义好本地端口后访问http://127.0.0.1:8000/,可通过web端进行文件转换,之后可通过点击“Get Zentao CSV / Get TestLink XML / Go Back”,生成对应的文件类型。

三、xmind书写模板和规则

这里是标准的xmind转换库所要求的xming用例格式
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
第六条规则,我们使用标注优先级图标作为”测试标题”与”测试步骤”界线,如果解析过程没有遇到优先级图标,则TestSuite后面的子主题链作为一条测试用例。
一条测试用例支持只有标题,没有测试步骤和预期结果,因为实际测试过程中,我们常常通过用例标题就可以明确测试点了。

之所以有第六条规则这样设计,因为实际测试用例设计过程中,我们所测产品往往有非常多的模块和层级。

四.xmind2testcase转换库针对禅道代码改良

默认下xmind2testcase转换的csv文件导入禅道时,不会添加用例类型和测试阶段。这里通过修改代码的方式使其导入时具有默认值,免去了导入后还要手动填写的麻烦。

4.1修改优先级,修改zentao.py

def gen_case_priority(priority):
    # 修改前
    # mapping = {1: '高', 2: '中', 3: '低'}
    # 修改后
    mapping = {1: '1', 2: '2', 3: '3', 4: '4'}
    if priority in mapping.keys():
        return mapping[priority]
    else:
        # 修改前
        return '中'
        # 修改后
        return '2'

4.2.修改用例类型,修改zentao.py

# 用例类型 用星星实现
def gen_case_type(case_type):
    mapping = {'star-red': "功能", "star-orange": "UI自动化", "star-blue": "接口自动化", "star-green": "性能",
               "star-purple": "安全", "star-dark-green": "安装部署", "star-dark-gray": "其他"}
    if case_type in mapping.keys():
        return mapping[case_type]
    else:
        return '功能'

4.3.修改适应阶段,修改zentao.py

def gen_a_testcase_row(testcase_dict):
    # ['所属模块', '相关需求', '用例标题', '前置条件', '步骤', '预期', '关键词', '优先级', '用例类型', '适用阶段']
    case_module = gen_case_module(testcase_dict['suite'])
    case_demand_name = gen_case_demand_name(testcase_dict['demand_name'])
    case_title = testcase_dict['name']
    case_precontion = testcase_dict['preconditions']  # 前置条件
    case_step, case_expected_result = gen_case_step_and_expected_result(testcase_dict['steps'])  # 测试步骤和预期
    case_keyword = gen_case_keyword(testcase_dict['demand_name'])  #关键词
    case_priority = gen_case_priority(testcase_dict['importance'])
    case_type = gen_case_type(testcase_dict['execution_type'])  # 用例类型 默认功能 标签实现
    # 修改前
    # case_apply_phase = '迭代测试'
    # 修改后
    case_apply_phase = '功能测试阶段'
    row = [case_module, case_demand_name, case_title, case_precontion, case_step, case_expected_result, case_keyword,
           case_priority, case_type, case_apply_phase]
    return row

4.4.导出文件有空行,修改zentao.py

zentao.py文件找到xmind_to_zentao_csv_file函数,写入文件方法加上newline=''
# 修改前
# with open(zentao_file, 'w', encoding='utf8') as f:
# 修改后
with open(zentao_file, 'w', encoding='utf8', newline='') as f:

4.5.用例步骤、预期结果序号后多一个空格,修改zentao.py

def gen_case_step_and_expected_result(steps):
    case_step = ''
    case_expected_result = ''
    # 修改后,把+ '. ' + 后的空格去掉  + '.' +
    for step_dict in steps:
        case_step += str(step_dict['step_number']) + '.' + step_dict['actions'].replace('\n', '').strip() + '\n'
        case_expected_result += str(step_dict['step_number']) + '.' + \
                                step_dict['expectedresults'].replace('\n', '').strip() + '\n' \

4.6.每导出一个用例步骤和预期结果都会多一个换行符,修改zentao.py

在这里插入图片描述
需要去除最后一个换行符

def gen_case_step_and_expected_result(steps):
    case_step = ''
    case_expected_result = ''
    # 修改后,把+ '. ' + 后的空格去掉  + '.' +
    for step_dict in steps:
        case_step += str(step_dict['step_number']) + '.' + step_dict['actions'].replace('\n', '').strip() + '\n'
        case_expected_result += str(step_dict['step_number']) + '.' + \
                                step_dict['expectedresults'].replace('\n', '').strip() + '\n' \
            if step_dict.get('expectedresults', '') else ''
    # 添加,去除每个单元格里最后一个换行符
    case_step = case_step.rstrip('\n')
    case_expected_result = case_expected_result.rstrip('\n')
    return case_step, case_expected_result

4.7.填写默认关键词,修改zentao.py

def gen_a_testcase_row(testcase_dict):
    case_module = gen_case_module(testcase_dict['suite'])
    case_title = testcase_dict['name']
    case_precontion = testcase_dict['preconditions']
    case_step, case_expected_result = gen_case_step_and_expected_result(testcase_dict['steps'])
    # 此处可填写默认关键词
    case_keyword = ''

4.8.去掉用例标题中的空格,修改parser.py

def gen_testcase_title(topics):
    """Link all topic's title as testcase title"""
    titles = [topic['title'] for topic in topics]
    titles = filter_empty_or_ignore_element(titles)
 
    # when separator is not blank, will add space around separator, e.g. '/' will be changed to ' / '
    separator = config['sep']
    if separator != ' ':
        # 修改前
        # separator = ' {} '.format(separator)
        # 修改后
        separator = ' {} '.format(separator)
    return separator.join(titles)

4.9.增加需求字段

4.9.1修改metadata.py

    def __init__(self, name='', demand_name='', details='', testcase_list=None, sub_suites=None, statistics=None):
        """
        TestSuite
        :param name: test suite name 模块名
        :param name: test suite demand_name 需求名
        :param details: test suite detail infomation
        :param testcase_list: test case list
        :param sub_suites: sub test suite list
        :param statistics: testsuite statistics info {'case_num': 0, 'non_execution': 0, 'pass': 0, 'failed': 0, 'blocked': 0, 'skipped': 0}
        """
        self.name = name
        self.demand_name = demand_name
        self.details = details
        self.testcase_list = testcase_list
        self.sub_suites = sub_suites
        self.statistics = statistics
    def to_dict(self):
        data = {
            'name': self.name,
            'demand_name': self.demand_name,
            'details': self.details,
            'testcase_list': [],
            'sub_suites': []
        }        

4.9.2 修改utils.py

def get_xmind_testcase_list(xmind_file):
    """Load the XMind file and get all testcase in it

    :param xmind_file: the target XMind file
    :return: a list of testcase data
    """
    xmind_file = get_absolute_path(xmind_file)
    testsuites = get_xmind_testsuites(xmind_file)
    testcases = []

    for testsuite in testsuites:
        product = testsuite.name
        for suite in testsuite.sub_suites:
            for case in suite.testcase_list:
                case_data = case.to_dict()
                case_data['product'] = product
                case_data['suite'] = suite.name
                case_data['demand_name'] = suite.demand_name
                testcases.append(case_data)
    return testcases

4.10.把原先的产品名(中心主题)改为功能模块名,输出文件名字一致,修改parser.py

def xmind_to_testsuites(xmind_content_dict):
    """convert xmind file to `xmind2testcase.metadata.TestSuite` list"""
    suites = []
    for sheet in xmind_content_dict:
        root_topic = sheet['topic']
        for i in range(len(root_topic['topics'])):
            suite = sheet_to_suite(root_topic['topics'][i])
            suites.append(suite)
    return suites


def filter_empty_or_ignore_element(values):
    """Filter all empty or ignore XMind elements, especially notes、comments、labels element"""
    result = []
    for value in values:
        if isinstance(value, str) and not value.strip() == '' and not value[0] in config['ignore_char']:
            result.append(value.strip())
    return result


def sheet_to_suite(root_topic):
    """convert a xmind sheet to a `TestSuite` instance"""
    suite = TestSuite()
    root_title = []

    def x(data):
        root_title.append(data['title'])
        if 'topics' in data.keys():
            data = data['topics'][0]
            x(data)
    x(root_topic)
    global module_name, demand_name
    module_name = root_title[1]  # 模块名
    demand_name = root_title[0] # 需求名


    suite.name = module_name  # 模块名
    suite.demand_name = demand_name  # 需求名
    suite.details = root_topic['note']
    suite.sub_suites = []

    for suite_dict in [root_topic]:
        suite.sub_suites.append(parse_testsuite(suite_dict))

    return suite


def parse_testsuite(suite_dict):
    testsuite = TestSuite()
    testsuite.name = module_name  # 模块名
    testsuite.demand_name = demand_name  # 需求名
    testsuite.details = suite_dict['note']
    testsuite.testcase_list = []

    for cases_dict in suite_dict.get('topics', []):
        for case in recurse_parse_testcase(cases_dict):
            testsuite.testcase_list.append(case)
    return testsuite


def recurse_parse_testcase(case_dict, parent=None):
    if is_testcase_topic(case_dict):
        case = parse_a_testcase(case_dict, parent)
        yield case
    else:
        if not parent:
            parent = []

        parent.append(case_dict)

        for child_dict in case_dict.get('topics', []):
            for case in recurse_parse_testcase(child_dict, parent):
                yield case

        parent.pop()


def is_testcase_topic(case_dict):
    """A topic with a priority marker, or no subtopic, indicates that it is a testcase"""
    priority = get_priority(case_dict)
    if priority:
        return True

    children = case_dict.get('topics', [])
    if children:
        return False

    return True


# 用例数据组合
def parse_a_testcase(case_dict, parent):
    testcase = TestCase()
    topics = parent + [case_dict] if parent else [case_dict]
    # 用例名称
    testcase.name = gen_testcase_title(topics)
    # 前置条件
    preconditions = gen_testcase_preconditions(topics)
    testcase.preconditions = preconditions if preconditions else ' '
    summary = gen_testcase_summary(topics)
    testcase.summary = summary if summary else testcase.name
    testcase.execution_type = get_execution_type(case_dict)  # 用例类型
    testcase.importance = get_priority(case_dict) or 2  # 优先级 1 2 3 4

    step_dict_list = case_dict.get('topics', [])
    if step_dict_list:
        testcase.steps = parse_test_steps(step_dict_list)
    testcase.result = get_test_result(case_dict['markers'])

    if testcase.result == 0 and testcase.steps:
        for step in testcase.steps:
            if step.result == 2:
                testcase.result = 2
                break
            if step.result == 3:
                testcase.result = 3
                break
            testcase.result = step.result
    return testcase


# 用例类型
def get_execution_type(case_dict):
    if isinstance(case_dict['markers'], list):
        for marker in case_dict['markers']:
            if marker.startswith('star'):
                return marker


# 优先级
def get_priority(case_dict):
    """Get the topic's priority(equivalent to the importance of the testcase)"""
    if isinstance(case_dict['markers'], list):
        for marker in case_dict['markers']:
            if marker.startswith('priority'):
                return int(marker[-1])


# 用例名称
def gen_testcase_title(topics):
    """Link all topic's title as testcase title"""
    titles = [topic['title'] for topic in topics]
    titles = filter_empty_or_ignore_element(titles)
    return titles[-1]


# 前置条件 修改成标签
def gen_testcase_preconditions(topics):
    labels = [topic.get('label', '') for topic in topics]
    labels = filter_empty_or_ignore_element(labels)
    for item in labels[::-1]:
        return item


def gen_testcase_summary(topics):
    comments = [topic['comment'] for topic in topics]
    comments = filter_empty_or_ignore_element(comments)
    return config['summary_sep'].join(comments)


# 用例步骤
def parse_test_steps(step_dict_list):
    steps = []
    for step_num, step_dict in enumerate(step_dict_list, 1):
        test_step = parse_a_test_step(step_dict)
        test_step.step_number = step_num
        steps.append(test_step)
    return steps


# 预期结果
def parse_a_test_step(step_dict):
    test_step = TestStep()
    test_step.actions = step_dict['title']
    expected_topics = step_dict.get('topics', [])
    if expected_topics:
        # 预期结果获取
        expected_topic = expected_topics[0]
        expected_result = expected_topic['title']
        if expected_result is None:  # 如果预期结果为空 使用空格占位
            expected_result = ' '
        test_step.expectedresults = expected_result
        markers = expected_topic['markers']
        test_step.result = get_test_result(markers)
    else:
        markers = step_dict['markers']
        test_step.result = get_test_result(markers)
    return test_step

五.修改xmind2testcase支持导出xlsx文档

默认只能导出csv格式的,而公司用的禅道版本又只支持xlsx格式的导入

5.1 使用pandas库

5.1.1在zentao.py文件中添加函数:xmind_to_zentao_xlsx_file_by_pandas,如下:

import pandas as pd    #使用pandas包来写入excel的,需要引入
def xmind_to_zentao_xlsx_file_by_pandas(xmind_file): #xmind导出禅道用例模板的xlsx格式
    """Convert XMind file to a zentao xlsx file"""
    xmind_file = get_absolute_path(xmind_file)
    logging.info('Start converting XMind file(%s) to zentao file...', xmind_file)
    testcases = get_xmind_testcase_list(xmind_file)

    fileheader = ["所属模块", "相关需求", "用例标题", "前置条件", "步骤", "预期", "关键词", "优先级", "用例类型", "适用阶段"]  # zd:添加“相关需求”字段
    zentao_testcase_rows = []
    for testcase in testcases:
        row = gen_a_testcase_row(testcase)
        zentao_testcase_rows.append(row)

    zentao_file = xmind_file[:-6] + '.xlsx'
    df = pd.DataFrame(data=zentao_testcase_rows, columns=fileheader) #构造数据
    df.to_excel(zentao_file, index=False)  #写入文件,设置不需要索引
    logging.info('Convert XMind file(%s) to a zentao csv file(%s) successfully!', xmind_file, zentao_file)
    return zentao_file

5.1.2在application.py中添加路由

@app.route('/<filename>/to/zentao_xlsx')
def download_zentao_xlsx_file(filename):
    full_path = join(app.config['UPLOAD_FOLDER'], filename)

    if not exists(full_path):
        abort(404)

    zentao_xlsx_file = xmind_to_zentao_xlsx_file_by_pandas(full_path)
    filename = os.path.basename(zentao_xlsx_file) if zentao_xlsx_file else abort(404)

    return send_from_directory(app.config['UPLOAD_FOLDER'], filename, as_attachment=True)

5.1.3在index.html添加xlsx的访问路径

<a href="{{ url_for('download_zentao_xlsx_file',filename=record[1]) }}">xlsx</a> |

5.1.4在ipreview.html添加xlsx的访问路径

<a href="{{ url_for('download_zentao_xlsx_file',filename= name) }}">Get Zentao xlsx</a>

运行application.py,即可看到此项目以运行,访问后则可以看到添加的xlsx导出链接
在这里插入图片描述

5.2 使用openpyxl

def xmind_to_zentao_xlsx_file(xmind_file):
    xmind_file = get_absolute_path(xmind_file)
    testcases = get_xmind_testcase_list(xmind_file)
    # print(testcases)

    fileheader = ["所属模块", "相关需求", "用例标题", "前置条件", "步骤", "预期", "关键词", "优先级", "用例类型", "适用阶段"]
    zentao_testcase_rows = [fileheader]
    for testcase in testcases:
        row = gen_a_testcase_row(testcase)
        zentao_testcase_rows.append(row)

    zentao_file = xmind_file[:-6] + '.xlsx'
    if os.path.exists(zentao_file):
        os.remove(zentao_file)
    xl = openpyxl.Workbook()
    xls = xl.create_sheet(index=0)
    for i in zentao_testcase_rows:
        xls.append(i)
    xl.save(zentao_file)
    return zentao_file

六.编写规则

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/33850.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

MacOS 升级golang版本后无法debug,升级delve版本

golang版本升级到1.20以后导致debug失效了&#xff0c;本文针对MacOS系统&#xff0c;win系统也可作参考。 WARNING: undefined behavior - version of Delve is too old for Go version 1.20.4 (maximum supported version 1.19) 1、升级delve版本 brew install delve 安装…

抖音seo账号矩阵系统源码代开发组件

一.开发矩阵系统的项目背景&#xff1a; 目录 一.开发矩阵系统的项目背景&#xff1a; 二.短视频矩阵系统SaaS模板组件通常包含以下几个方面的内容&#xff1a; 三.抖音SEO账号矩阵系统源码的技术搭建过程可以分为几个步骤&#xff1a; 1.确定系统的需求和目标&#xff0c…

MATLAB App Designer基础教程 Matlab GUI入门(一)

MATLAB GUI入门 第一天 学习传送门&#xff1a; 【MATLAB App Designer基础教程Matlab GUI界面设计&#xff08;全集更新完毕-用户界面设计appdesigner&#xff08;中文&#xff09;Matlab Gui教程】 https://www.bilibili.com/video/BV16f4y147x9/?p2&share_sourcecopy_…

Spring Boot是什么?详解它的优缺点以及四大核心

作者&#xff1a;Insist-- 个人主页&#xff1a;insist--个人主页 作者会持续更新网络知识和python基础知识&#xff0c;期待你的关注 目录 一、Spring Boot 是什么&#xff1f; 二、Spring Boot 的优缺点 1、优点 ①可快速构建独立的 Spring 应用 ②直接嵌入Tomcat、Jett…

基于SpringBoot+mybatis+layui就业管理系统设计和实现

基于SpringBootmybatislayui就业管理系统设计和实现 博主介绍&#xff1a;5年java开发经验&#xff0c;专注Java开发、定制、远程、指导等,csdn特邀作者、专注于Java技术领域 作者主页 超级帅帅吴 Java项目精品实战案例《500套》 欢迎点赞 收藏 ⭐留言 文末获取源码联系方式 文…

Rust语言从入门到入坑——(11)面向对象

文章目录 0、引入1、封装2、继承3、多态4、引用 0、引入 Rust 不是面向对象的编程语言&#xff0c;但是可以实现面向对象方法&#xff1a;封装与继承&#xff0c;以及不完全的多态 1、封装 "类"往往是面向对象的编程语言中常用到的概念。"类"封装的是数据…

由于找不到msvcr110.dll,无法继续执行的三个可行修复方案

MSVCR110.dll是一种动态链接库文件&#xff0c;它是由Microsoft Visual Studio 2012的C运行时库的一部分。该文件主要负责提供C代码在Windows操作系统上运行所需的运行时支持。是Windows操作系统中非常重要的文件&#xff0c;如果文件出现损坏或者丢失&#xff0c;计算机系统就…

Windows下通过FastGithub加速国内GitHub访问

有时候在国内访问GitHub会非常慢&#xff0c;有时候直接打不开&#xff0c;无法访问&#xff0c;最近了解到了FastGithub 可以解决以下几个问题: github加速神器&#xff0c;解决github打不开、用户头像无法加载、releases无法上传下载、git-clone、git-pull、git-push失败等问…

设计模式第18讲——中介者模式(Mediator)

目录 一、什么是中介者模式 二、角色组成 三、优缺点 四、应用场景 4.1 生活场景 4.2 java场景 五、代码实现 5.0 代码结构 5.1 抽象中介者&#xff08;Mediator&#xff09;——LogisticsCenter 5.2 抽象同事类&#xff08;Colleague&#xff09;——Participant 5…

Scala之泛型详解

泛型用于指定类或方法可以接受任意类型参数&#xff0c;参数在实际使用时才被确定&#xff0c;泛型可以有效地增强程序的适用性&#xff0c;使用泛型可以使得类或方法具有更强的通用性。泛型的典型应用场景是集合及集合中的方法参数&#xff0c;可以说同 Java 一样&#xff0c;…

LabVIEW开发基于直流电机的高精度定位火星车

LabVIEW开发基于直流电机的高精度定位火星车 火星探测器一直用于火星探测的自动无人驾驶车辆。这些机器人远程车辆用于避免对人类不公平的条件&#xff0c;并减少与之相关的危险。这一研究领域引起了许多科学家和研究人员的注意&#xff0c;这导致了这一技术领域的显着进步。已…

Quartz任务调度笔记

一、概念 1.1简介 Quzrtz是OpenSymphony开源组织在Job scheduling领域的开源项目 特点&#xff1a;Quartz具有丰富特性的"任务调度库"&#xff0c;能够集成于任何的Java应用&#xff0c;小到独立的应用&#xff0c;大到电子商业系统。quartz能够创建亦简单亦复杂的调…

如何建立一个企业网站

建立一个企业网站的方法 1、好。如果你的网站将专注于你已经有了一个不错的主意&#xff0c;请跳过此步骤。如果不是&#xff0c;这里有一些事情来帮助你找出答案。首先&#xff0c;要明白&#xff0c;有几十亿人在互联网上&#xff0c;一个健康的比例有自己的网站。如果你限制…

ResizeKit.NET 自动更改所有控件和字体大小 -Crack Version

ResizeKit2.NET ---Added support for Microsoft .NET 7.0. 使您的应用程序大小和分辨率独立。 ResizeKit.NET 自动更改所有控件和字体的大小&#xff0c;以便它们可以显示在任何大小的表单上。提供完全控制来自定义调整大小过程。即使用户在运行应用程序时切换表单的大小&…

探索 Spring Boot 项目全过程

文章目录 &#x1f387;前言1.Spring Boot 所需环境2.Spring Boot 项目创建2.1 安装插件2.2 创建新项目2.3 项目属性配置2.4添加依赖2.4 修改项目名称2.5 添加框架支持2.6 目录介绍 3.判断Spring Boot 创建项目是否成功&#x1f386;总结 &#x1f387;前言 在 Java 这个圈子&…

Qt在Ubuntu下如何进行桌面软件开发?

文章目录 0.引言1.新建项目2.编写第一个程序3.在Qt外部启动程序 0.引言 笔者研究的方向涉及在ubuntu中运行代码&#xff0c;早先是直接利用控制台运行代码文件&#xff0c;在控制台中虽然设法将代码精简到一个三个文件中&#xff0c;只需要在控制台运行这三个文件即可&#xff…

使用itextpdf填充表单域并生成pdf

文章目录 前言一、准备工作1.1 安装软件1.2 准备pdf1.3 设置表单域 二、创建项目三、编写代码3.1 编写工具类3.2 测试 四、测试结果 前言 最近手上有个任务&#xff0c;就是需要做一个pdf导出的功能。 可选择的技术点比较多&#xff0c;我这边综合考虑之后&#xff0c;使用的…

第五课—大学英语四六级备考—听力专项

Key words 1.implement vt.实施 "Implement" 在中文中的意思是「实施」或「执行」。以下是一些示例用法和搭配&#xff1a; 中文意思&#xff1a;实施、执行 形近字&#xff1a;implicate&#xff08;牵连&#xff09; 1. 用英文造句&#xff1a;The government …

微信小程序浏览docx,pdf等文件在线预览使用wx.openDocument

wx.downloadFile({ url: fileUrl,//pdf链接success(res) {wx.openDocument({ //打开文档filePath: res.tempFilePath,fileType: "pdf",//文档类型showMenu: true,success: function (res) {wx.showToast({title: 打开文档成功,})},fail: function (res) {wx.showToas…

vue封装svg组件来修改svg图片颜色

文章目录 1、引入依赖2、根目录的vue.config.js配置3、在组件文件夹(compontents)中创建svgIcon.vue4、在src目录下创建icons文件5、处理svg格式的图片6、在main.js文件中引入icons文件中的index.js文件7、使用8、效果图1、项目成功运行后的样子2、直接在html上添加样式&#x…
最新文章