|
|
@@ -2,17 +2,17 @@
|
|
|
<div class="bg">
|
|
|
<div class="bigContainer">
|
|
|
<el-card>
|
|
|
- <p class="bigTitle">鸿蒙开发实践</p>
|
|
|
+ <p class="bigTitle">鸿蒙项目实践</p>
|
|
|
<div class="totalInfo">
|
|
|
<div class="totalInfoLeft">
|
|
|
<div class="totalInfoLeft1">
|
|
|
- <span>所属微认证:鸿蒙开发微认证</span>
|
|
|
+ <span>所属微认证:鸿蒙开发入门</span>
|
|
|
<span style="margin-left: 50px">完成度:20%</span>
|
|
|
</div>
|
|
|
<div class="totalInfoLeft2">
|
|
|
<span>源代码地址:</span>
|
|
|
- <span style="color: dodgerblue">https://p.seec.seecoder.cn/exam/9511</span>
|
|
|
- <el-button class="miniButton">复制</el-button>
|
|
|
+ <span style="color: dodgerblue">https://seecoder-gitlab-gitlab.seec.seecoder.cn/18852002519/ios</span>
|
|
|
+ <el-button class="miniButton" size="small">复制</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="totalInfoRight">
|
|
|
@@ -28,13 +28,15 @@
|
|
|
构建记录
|
|
|
</p>
|
|
|
</template>
|
|
|
- <el-table :data="buildData" style="width: 100%">
|
|
|
- <el-table-column prop="id" label="id" />
|
|
|
- <el-table-column prop="buildTime" label="构建时间" />
|
|
|
- <el-table-column prop="status" label="状态" />
|
|
|
- <el-table-column prop="pkg" label="产物包">
|
|
|
+ <el-table :data="buildData.reverse()" style="width: 100%">
|
|
|
+ <el-table-column prop="id" label="id" width="120px" align="center"/>
|
|
|
+ <el-table-column prop="buildTime" label="构建时间" align="center" width="300px"/>
|
|
|
+ <el-table-column prop="source" label="触发方式" align="center" width="280px"/>
|
|
|
+ <el-table-column prop="status" label="状态" align="center" width="240px"/>
|
|
|
+ <el-table-column prop="pkg" align="center" label="产物包">
|
|
|
<template #default="scope">
|
|
|
- <a class="pkgUrl" :src=scope.row.pkg >{{scope.row.pkg}}</a>
|
|
|
+ <a v-if="scope.row.pkg" class="pkgUrl" :src=scope.row.pkg >{{scope.row.pkg}}</a>
|
|
|
+ <span v-else>无</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -51,8 +53,8 @@
|
|
|
<div class="autoTestRecord" style="margin-top: -20px">
|
|
|
选择产物包:
|
|
|
<el-radio-group v-model="radio" style="color:#000;">
|
|
|
- <el-radio :label="1" style="color:#000;">2-package.apk</el-radio>
|
|
|
- <el-radio :label="2" style="color:#000;">3-package.apk</el-radio>
|
|
|
+ <el-radio :label="1" style="color:#000;">2-package.hap</el-radio>
|
|
|
+ <el-radio :label="2" style="color:#000;">3-package.hap</el-radio>
|
|
|
</el-radio-group>
|
|
|
|
|
|
</div>
|
|
|
@@ -72,6 +74,7 @@
|
|
|
<codemirror
|
|
|
placeholder="Code gose here..."
|
|
|
:mode="lang-python"
|
|
|
+ v-model="testFile"
|
|
|
/>
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
|
@@ -85,7 +88,7 @@
|
|
|
测试记录
|
|
|
</p>
|
|
|
</template>
|
|
|
- <el-table :data="testData" style="width: 100%">
|
|
|
+ <el-table :data="testData.reverse()" style="width: 100%">
|
|
|
<el-table-column prop="id" label="id" />
|
|
|
<el-table-column prop="testTime" label="测试时间" />
|
|
|
<el-table-column prop="status" label="状态" />
|
|
|
@@ -117,31 +120,70 @@ export default {
|
|
|
buildData:[
|
|
|
{
|
|
|
id:1,
|
|
|
- buildTime:"2023-4-20 15:20",
|
|
|
- status:"正在构建",
|
|
|
- pkg:"-"
|
|
|
+ buildTime:"2023-4-20 15:03",
|
|
|
+ source:"GitLab自动触发",
|
|
|
+ status:"构建失败"
|
|
|
},
|
|
|
{
|
|
|
id:2,
|
|
|
- buildTime:"2023-4-20 15:20",
|
|
|
+ buildTime:"2023-4-20 15:26",
|
|
|
+ source:"手动触发",
|
|
|
+ status:"构建成功",
|
|
|
+ pkg:"2-package.hap"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id:3,
|
|
|
+ buildTime:"2023-4-21 18:39",
|
|
|
+ source:"GitLab自动触发",
|
|
|
status:"构建成功",
|
|
|
- pkg:"2-package.apk"
|
|
|
+ pkg:"3-package.hap"
|
|
|
}
|
|
|
],
|
|
|
testData :[
|
|
|
{
|
|
|
id:1,
|
|
|
- testTime:"2023-4-20 15:20",
|
|
|
- status:"正在测试",
|
|
|
+ testTime:"2023-4-20 15:41",
|
|
|
+ status:"测试失败",
|
|
|
testRes:"-"
|
|
|
},
|
|
|
{
|
|
|
id:2,
|
|
|
- testTime:"2023-4-20 15:20",
|
|
|
+ testTime:"2023-4-20 16:17",
|
|
|
status:"测试成功",
|
|
|
testRes:"80"
|
|
|
}
|
|
|
],
|
|
|
+ testFile: "from appium import webdriver\n" +
|
|
|
+ "import allure\n" +
|
|
|
+ "import os\n" +
|
|
|
+ "\n" +
|
|
|
+ "desired_caps = {\n" +
|
|
|
+ " 'platformName': 'Android',\n" +
|
|
|
+ " 'platformVersion': '10',\n" +
|
|
|
+ " 'deviceName': 'test',\n" +
|
|
|
+ " 'appPackage': 'com.example.myapplication',\n" +
|
|
|
+ " 'appActivity': 'MainAbilityShellActivity',\n" +
|
|
|
+ " 'noReset': True,\n" +
|
|
|
+ " 'newCommandTimeout': 6000,\n" +
|
|
|
+ "}\n" +
|
|
|
+ "\n" +
|
|
|
+ "@allure.feature('测试打开') # 功能名称\n" +
|
|
|
+ "class TestSettings():\n" +
|
|
|
+ " @allure.story('打开服务') # 子功能名称 \n" +
|
|
|
+ " @allure.title('打开') # 用例标题 \n" +
|
|
|
+ " @allure.severity('normal') # 缺陷级别 \n" +
|
|
|
+ " @allure.description('检查是否可以打开') # 用例描述 \n" +
|
|
|
+ " def test_settings_001(self):\n" +
|
|
|
+ " driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)\n" +
|
|
|
+ " # 测试步骤 \n" +
|
|
|
+ " with allure.step('打开'):\n" +
|
|
|
+ " pass\n" +
|
|
|
+ " with allure.step('进行截图测试'):\n" +
|
|
|
+ " driver.save_screenshot('test.png')\n" +
|
|
|
+ " pass\n" +
|
|
|
+ " with allure.step('断言是否成功'):\n" +
|
|
|
+ " result = os.path.exists('test.png')\n" +
|
|
|
+ " assert result == True\n",
|
|
|
radio:1
|
|
|
};
|
|
|
},
|
|
|
@@ -235,7 +277,7 @@ autoTestCard{
|
|
|
}
|
|
|
|
|
|
.record{
|
|
|
- margin-top: 50px;
|
|
|
+ margin-top: 35px;
|
|
|
padding: 20px;
|
|
|
border: grey solid 1px;
|
|
|
border-radius: 8px;
|