添加地图绘制图形的用例,并更改包名

This commit is contained in:
彭宇琦 2020-03-28 19:12:41 +08:00
parent f54fdad7fe
commit 231993dc4b
14 changed files with 144 additions and 105 deletions

View File

@ -1,106 +1,140 @@
<?xml version="1.0" encoding="GBK"?>
<cases project="Map">
<case name="addRangeFindingCase">
<title value="在地图上进行测距" />
<keyword value="地图,测距" />
<rank value="3" />
<?xml version='1.0' encoding='UTF-8'?>
<cases project='Map'>
<case name='addRangeFindingCase'>
<titles>
<title id='1' value='在地图上进行测距' />
</titles>
<keys>
<key id='1' value='地图,测距' />
</keys>
<ranks>
<rank id='1' value='3' />
</ranks>
<preconditions>
</preconditions>
<steps>
<step id="1" value="设置画线的起点后拖动鼠标" />
<step id="2" value="在地图上画线后单击鼠标左键" />
<step id="3" value="在地图上画线后双击鼠标左键" />
<step id="4" value="停止画线后缩放地图" />
<step id="5" value="设置起点后直接双击左键" />
<step id="6" value="在不同的地图比例上画等长的线段" />
<step id="7" value="在画好的线段上,点击“×”按钮" />
<step id='1' value='设置画线的起点后拖动鼠标' />
<step id='2' value='在地图上画线后单击鼠标左键' />
<step id='3' value='在地图上画线后双击鼠标左键' />
<step id='4' value='停止画线后缩放地图' />
<step id='5' value='设置起点后直接双击左键' />
<step id='6' value='在不同的地图比例上画等长的线段' />
<step id='7' value='在画好的线段上,点击“×”按钮' />
</steps>
<expectations>
<expectation id="1" value="线随鼠标的移动而增长,且标注中显示的距离随鼠标的移动而改变"/>
<expectation id="2" value="还能继续画线测距,且标注中显示的距离应累加上一次定位的距离"/>
<expectation id="3" value="停止画线,且线段留在地图上"/>
<expectation id="4" value="线段随地图的缩放而改变其长度,且方框中的内容显示不变"/>
<expectation id="5" value="停止画线"/>
<expectation id="6" value="随地图缩放程度不同,其不同比例尺下画出的等长的线段在标注中显示的距离不同"/>
<expectation id="7" value="线段被清除"/>
</expectations>
<excepts>
<except id='1' value='线随鼠标的移动而增长,且标注中显示的距离随鼠标的移动而改变'/>
<except id='2' value='还能继续画线测距,且标注中显示的距离应累加上一次定位的距离'/>
<except id='3' value='停止画线,且线段留在地图上'/>
<except id='4' value='线段随地图的缩放而改变其长度,且方框中的内容显示不变'/>
<except id='5' value='停止画线'/>
<except id='6' value='随地图缩放程度不同,其不同比例尺下画出的等长的线段在标注中显示的距离不同'/>
<except id='7' value='线段被清除'/>
</excepts>
</case>
<case name="addMapPointCase">
<title value="查看地图*{pointName}*定位点信息" />
<keyword value="地图,*{pointName}*,定位点" />
<rank value="2" />
<case name='addMapPointCase'>
<titles>
<title id='1' value='查看地图*{标记点名称}*定位点信息' />
</titles>
<keys>
<key id='1' value='地图,*{标记点名称}*,定位点' />
</keys>
<ranks>
<rank id='1' value='2' />
</ranks>
<preconditions>
<precondition value="地图上有多个*{pointName}*定位点以及聚合点存在" />
<precondition id='1' value='地图上有多个*{标记点名称}*定位点以及聚合点存在' />
</preconditions>
<steps>
<step id="1" value="在地图上点击*{pointName}*的定位点" />
<step id="2" value="在地图上点击*{pointName}*的聚合点" />
<step id='1' value='在地图上点击*{标记点名称}*的定位点' />
<step id='2' value='在地图上点击*{标记点名称}*的聚合点' />
</steps>
<expectations>
<expectation id="1" value="能查看到该*{pointName}*的详细信息"/>
<expectation id="2" value="地图能自动缩放到能看到*{pointName}*定位点的比例"/>
</expectations>
<excepts>
<except id='1' value='能查看到该*{标记点名称}*的详细信息'/>
<except id='2' value='地图能自动缩放到能看到*{标记点名称}*定位点的比例'/>
</excepts>
</case>
<case name="addMapSearchInformationCase">
<title value="通过*{condition}*在地图上搜索*{name}*信息" />
<keyword value="地图,*{name}*,搜索" />
<rank value="1" />
<case name='addMapSearchInformationCase'>
<titles>
<title id='1' value='通过*{搜索条件}*在地图上的*{信息}*信息进行搜索' />
</titles>
<keys>
<key id='1' value='地图,*{信息}*,搜索' />
</keys>
<ranks>
<rank id='1' value='1' />
</ranks>
<preconditions>
<precondition value="地图上有*{name}*信息存在" />
<precondition id='1' value='地图上有*{信息}*信息存在' />
</preconditions>
<steps>
<step id="1" value="通过*{condition}*对*{name}*进行模糊搜索" />
<step id="2" value="通过*{condition}*对*{name}*进行精准搜索" />
<step id="3" value="不输入信息进行搜索" />
<step id="4" value="输入*{name}*中都不包含的关键词进行搜索" />
<step id='1' value='通过*{搜索条件}*对*{信息}*进行模糊搜索' />
<step id='2' value='通过*{搜索条件}*对*{信息}*进行精准搜索' />
<step id='3' value='不输入信息进行搜索' />
<step id='4' value='输入*{信息}*中都不包含的关键词进行搜索' />
</steps>
<expectations>
<expectation id="1" value="地图上显示所有符合条件的*{name}*定位点"/>
<expectation id="2" value="地图上显示*{name}*对应的定位点"/>
<expectation id="3" value="地图界面保持不变"/>
<expectation id="4" value="提示无搜索结果"/>
</expectations>
<excepts>
<except id='1' value='地图上显示所有符合条件的*{信息}*定位点'/>
<except id='2' value='地图上显示*{信息}*对应的定位点'/>
<except id='3' value='地图界面保持不变'/>
<except id='4' value='提示无搜索结果'/>
</excepts>
</case>
<case name="addCarLocusPlaybackCase">
<title value="回放车辆轨迹" />
<keyword value="车辆轨迹" />
<rank value="1" />
<case name='addCarLocusPlaybackCase'>
<titles>
<title id='1' value='回放车辆轨迹' />
</titles>
<keys>
<key id='1' value='车辆轨迹' />
</keys>
<ranks>
<rank id='1' value='1' />
</ranks>
<preconditions>
<precondition value="车辆有轨迹存在" />
<precondition id='1' value='车辆有轨迹存在' />
</preconditions>
<steps>
<step id="1" value="查询到车辆的轨迹后点击回放或播放按钮" />
<step id="2" value="从最小的回放速度开始依次点击到最大的播放速度" />
<step id="3" value="在轨迹播放时点击播放按钮" />
<step id="4" value="在轨迹播放时点击暂停按钮,再点击回放按钮" />
<step id="5" value="在轨迹播放时点击停止按钮,再点击回放按钮" />
<step id='1' value='查询到车辆的轨迹后点击回放或播放按钮' />
<step id='2' value='从最小的回放速度开始依次点击到最大的播放速度' />
<step id='3' value='在轨迹播放时点击播放按钮' />
<step id='4' value='在轨迹播放时点击暂停按钮,再点击回放按钮' />
<step id='5' value='在轨迹播放时点击停止按钮,再点击回放按钮' />
</steps>
<expectations>
<expectation id="1" value="地图上的车辆点以默认速度沿着轨迹在地图上移动"/>
<expectation id="2" value="车辆点的回放速度依次加快"/>
<expectation id="3" value="车辆点移动后不受任何影响,且在继续移动"/>
<expectation id="4" value="车辆点停止移动后又重新在停止的位置继续移动"/>
<expectation id="5" value="车辆点停止移动后又从起点开始重新移动"/>
</expectations>
<excepts>
<except id='1' value='地图上的车辆点以默认速度沿着轨迹在地图上移动'/>
<except id='2' value='车辆点的回放速度依次加快'/>
<except id='3' value='车辆点移动后不受任何影响,且在继续移动'/>
<except id='4' value='车辆点停止移动后又重新在停止的位置继续移动'/>
<except id='5' value='车辆点停止移动后又从起点开始重新移动'/>
</excepts>
</case>
<case name="addShowLocusCase">
<title value="地图上显示车辆轨迹点" />
<keyword value="车辆轨迹" />
<rank value="1" />
<case name='mapGraphSignCase'>
<title id='1' value='在地图上绘制*{标记名称}*' />
<key id='1' value='*{标记名称}*' />
<rank id='1' value='1' />
<preconditions>
<precondition value="车辆有轨迹存在" />
</preconditions>
<steps>
<step id="1" value="依次点击*{pointType}*" />
<step id="2" value="点击“清除轨迹”按钮" />
<step id='1' value='点击*{图形类型}*图形,在地图中绘制相应的图形' />
<step id='2' value='点击多边形图形,在起始位置双击结束绘制' />
<step id='3' value='点击多边形图形,开始绘制后,不双击结束绘制,直接点击切换其他图形或地图外空白处' />
<step id='4' value='绘制多个图形' />
<step id='5' value='绘制图形时,框画大片区域,保存绘制' />
<step id='6' value='绘制图形后,关闭弹窗或取消保存弹窗' />
<step id='7' value='绘制图形后,清除图形' />
</steps>
<expectations>
<expectation id="1" value="地图上显示的车辆轨迹随点击的轨迹样式不同而变化"/>
<expectation id="2" value="地图上不再显示轨迹"/>
</expectations>
<excepts>
<except id='1' value='地图上能绘制出相应的图形'/>
<except id='2' value='若允许绘制,则显示一个点在地图;若无法绘制,则应给出提示'/>
<except id='3' value='多边形绘制停止,且地图不会不断得向鼠标移动方向移动'/>
<except id='4' value='图形绘制成功,地图上显示相应的图形'/>
<except id='5' value='图形绘制失败,并给出无法绘制多个图形相关的提示'/>
<except id='6' value='若允许绘制,则在地图上显示相应的图形;若无法绘制,则应给出提示'/>
<except id='7' value='绘制的图形无法保存'/>
<except id='8' value='绘制的图形消失'/>
</excepts>
</case>
</cases>

View File

@ -19,6 +19,8 @@ import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import pres.auxiliary.work.n.testcase.templet.LabelNotFoundException;
/**
* <p>
* <b>文件名</b>TestCaseTemplet.java

View File

@ -32,6 +32,9 @@ import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import pres.auxiliary.work.n.testcase.templet.Case;
import pres.auxiliary.work.n.testcase.templet.LabelNotFoundException;
/**
* <p>
* <b>文件名</b>WriteTestCase.java

View File

@ -1,4 +1,4 @@
package pres.auxiliary.work.n.testcase;
package pres.auxiliary.work.n.testcase.templet;
import java.io.File;
import java.util.ArrayList;
@ -11,6 +11,8 @@ import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import pres.auxiliary.work.n.testcase.IncorrectFileException;
/**
* <p><b>文件名</b>AbstractCase.java</p>
* <p><b>用途</b>定义测试用例模板类能返回的基本字段提供其相应的get与set方法但该方法不允许包外调用</p>

View File

@ -1,4 +1,4 @@
package pres.auxiliary.work.n.testcase;
package pres.auxiliary.work.n.testcase.templet;
/**
* <p><b>文件名</b>CaseContentException.java</p>

View File

@ -1,4 +1,4 @@
package pres.auxiliary.work.n.testcase;
package pres.auxiliary.work.n.testcase.templet;
import java.io.File;
import java.io.IOException;

View File

@ -1,4 +1,4 @@
package pres.auxiliary.work.n.testcase;
package pres.auxiliary.work.n.testcase.templet;
import java.io.File;
import java.util.Arrays;

View File

@ -1,4 +1,4 @@
package pres.auxiliary.work.n.testcase;
package pres.auxiliary.work.n.testcase.templet;
public class LabelNotFoundException extends RuntimeException {

View File

@ -1,4 +1,4 @@
package pres.auxiliary.work.n.testcase;
package pres.auxiliary.work.n.testcase.templet;
/**
* <p><b>文件名</b>LabelType.java</p>

View File

@ -29,7 +29,7 @@ public class TimeTest {
time = new Time(new Date(1575387550000L));
System.out.println(time.getTime());
System.out.println("-".repeat(20));
time = new Time(1575387800000L);
time = new Time(1585290323214L);
System.out.println(time.getTime());
System.out.println("-".repeat(20));
time = new Time("2019-12-04 03:03:20");
@ -218,7 +218,6 @@ public class TimeTest {
bw.write("\"personTime\":\"" + time.getTime() + "\"\r\n");
bw.write("},\r\n");
/*
bw.write("{\r\n");
time.setNowTime();
bw.write("\"equName\":\"");
@ -275,7 +274,6 @@ public class TimeTest {
time.addTime("-6.5h");
bw.write("\"personTime\":\"" + time.getTime() + "\"\r\n");
bw.write("}\r\n");
*/
bw.write("]\r\n");
bw.close();

View File

@ -7,10 +7,10 @@ import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import pres.auxiliary.work.n.testcase.DataListCase;
import pres.auxiliary.work.n.testcase.LabelType;
import pres.auxiliary.work.n.testcase.TestCaseTemplet;
import pres.auxiliary.work.n.testcase.TestCaseWrite;
import pres.auxiliary.work.n.testcase.templet.DataListCase;
import pres.auxiliary.work.n.testcase.templet.LabelType;
public class DataListCaseTest {
/**

View File

@ -6,11 +6,11 @@ import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import pres.auxiliary.work.n.testcase.CaseContentException;
import pres.auxiliary.work.n.testcase.InformationCase;
import pres.auxiliary.work.n.testcase.InformationCase.FileRuleType;
import pres.auxiliary.work.n.testcase.InformationCase.InputRuleType;
import pres.auxiliary.work.n.testcase.InformationCase.UploadFileType;
import pres.auxiliary.work.n.testcase.templet.CaseContentException;
import pres.auxiliary.work.n.testcase.templet.InformationCase;
import pres.auxiliary.work.n.testcase.templet.InformationCase.FileRuleType;
import pres.auxiliary.work.n.testcase.templet.InformationCase.InputRuleType;
import pres.auxiliary.work.n.testcase.templet.InformationCase.UploadFileType;
public class InformationCaseTest {
InformationCase ic = new InformationCase(new File("ConfigurationFiles/CaseConfigurationFile/CaseTemplet/AddInformation.xml"));
@ -180,7 +180,7 @@ public class InformationCaseTest {
}
/**
* 测试{@link InformationCase#addPhoneCase(String, boolean, boolean, boolean, pres.auxiliary.work.n.testcase.InformationCase.PhoneType...)}方法
* 测试{@link InformationCase#addPhoneCase(String, boolean, boolean, boolean, pres.auxiliary.work.n.testcase.templet.InformationCase.PhoneType...)}方法
*/
@Test
public void addPhoneCaseTest_Fixed() {
@ -188,7 +188,7 @@ public class InformationCaseTest {
}
/**
* 测试{@link InformationCase#addPhoneCase(String, boolean, boolean, boolean, pres.auxiliary.work.n.testcase.InformationCase.PhoneType...)}方法
* 测试{@link InformationCase#addPhoneCase(String, boolean, boolean, boolean, pres.auxiliary.work.n.testcase.templet.InformationCase.PhoneType...)}方法
*/
@Test
public void addPhoneCaseTest_Moble() {
@ -196,7 +196,7 @@ public class InformationCaseTest {
}
/**
* 测试{@link InformationCase#addPhoneCase(String, boolean, boolean, boolean, pres.auxiliary.work.n.testcase.InformationCase.PhoneType...)}方法
* 测试{@link InformationCase#addPhoneCase(String, boolean, boolean, boolean, pres.auxiliary.work.n.testcase.templet.InformationCase.PhoneType...)}方法
*/
@Test
public void addPhoneCaseTest_All() {
@ -284,7 +284,7 @@ public class InformationCaseTest {
}
/**
* 测试{@link InformationCase#addUploadFileCase(String, boolean, boolean, boolean, int, int, int, pres.auxiliary.work.n.testcase.InformationCase.UploadFileType, pres.auxiliary.work.n.testcase.InformationCase.FileRuleType...)}方法
* 测试{@link InformationCase#addUploadFileCase(String, boolean, boolean, boolean, int, int, int, pres.auxiliary.work.n.testcase.templet.InformationCase.UploadFileType, pres.auxiliary.work.n.testcase.templet.InformationCase.FileRuleType...)}方法
*/
@Test
public void addUploadFileCaseTest_1() {
@ -292,7 +292,7 @@ public class InformationCaseTest {
}
/**
* 测试{@link InformationCase#addUploadFileCase(String, boolean, boolean, boolean, int, int, int, pres.auxiliary.work.n.testcase.InformationCase.UploadFileType, pres.auxiliary.work.n.testcase.InformationCase.FileRuleType...)}方法
* 测试{@link InformationCase#addUploadFileCase(String, boolean, boolean, boolean, int, int, int, pres.auxiliary.work.n.testcase.templet.InformationCase.UploadFileType, pres.auxiliary.work.n.testcase.templet.InformationCase.FileRuleType...)}方法
*/
@Test
public void addUploadFileCaseTest_2() {
@ -300,7 +300,7 @@ public class InformationCaseTest {
}
/**
* 测试{@link InformationCase#addUploadFileCase(String, boolean, boolean, boolean, int, int, int, pres.auxiliary.work.n.testcase.InformationCase.UploadFileType, pres.auxiliary.work.n.testcase.InformationCase.FileRuleType...)}方法
* 测试{@link InformationCase#addUploadFileCase(String, boolean, boolean, boolean, int, int, int, pres.auxiliary.work.n.testcase.templet.InformationCase.UploadFileType, pres.auxiliary.work.n.testcase.templet.InformationCase.FileRuleType...)}方法
*/
@Test
public void addUploadFileCaseTest_3() {
@ -308,7 +308,7 @@ public class InformationCaseTest {
}
/**
* 测试{@link InformationCase#addUploadFileCase(String, boolean, boolean, boolean, int, int, int, pres.auxiliary.work.n.testcase.InformationCase.UploadFileType, pres.auxiliary.work.n.testcase.InformationCase.FileRuleType...)}方法
* 测试{@link InformationCase#addUploadFileCase(String, boolean, boolean, boolean, int, int, int, pres.auxiliary.work.n.testcase.templet.InformationCase.UploadFileType, pres.auxiliary.work.n.testcase.templet.InformationCase.FileRuleType...)}方法
*/
@Test
public void addUploadFileCaseTest_4() {
@ -316,7 +316,7 @@ public class InformationCaseTest {
}
/**
* 测试{@link InformationCase#addUploadFileCase(String, boolean, boolean, boolean, int, int, int, pres.auxiliary.work.n.testcase.InformationCase.UploadFileType, pres.auxiliary.work.n.testcase.InformationCase.FileRuleType...)}方法
* 测试{@link InformationCase#addUploadFileCase(String, boolean, boolean, boolean, int, int, int, pres.auxiliary.work.n.testcase.templet.InformationCase.UploadFileType, pres.auxiliary.work.n.testcase.templet.InformationCase.FileRuleType...)}方法
*/
@Test
public void addUploadFileCaseTest_5() {

View File

@ -10,12 +10,12 @@ import org.testng.annotations.BeforeGroups;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import pres.auxiliary.work.n.testcase.InformationCase;
import pres.auxiliary.work.n.testcase.LabelType;
import pres.auxiliary.work.n.testcase.MarkColorsType;
import pres.auxiliary.work.n.testcase.TestCaseTemplet;
import pres.auxiliary.work.n.testcase.TestCaseWrite;
import pres.auxiliary.work.n.testcase.InformationCase.InputRuleType;
import pres.auxiliary.work.n.testcase.templet.InformationCase;
import pres.auxiliary.work.n.testcase.templet.LabelType;
import pres.auxiliary.work.n.testcase.templet.InformationCase.InputRuleType;
public class ProgramWriteTestCaseDemo {
/**

View File

@ -12,12 +12,12 @@ import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import pres.auxiliary.work.n.testcase.FieldType;
import pres.auxiliary.work.n.testcase.InformationCase;
import pres.auxiliary.work.n.testcase.LabelType;
import pres.auxiliary.work.n.testcase.MarkColorsType;
import pres.auxiliary.work.n.testcase.TestCaseTemplet;
import pres.auxiliary.work.n.testcase.TestCaseWrite;
import pres.auxiliary.work.n.testcase.TestCaseWrite.CaseMark;
import pres.auxiliary.work.n.testcase.templet.InformationCase;
import pres.auxiliary.work.n.testcase.templet.LabelType;
/**
* <p>