소스 검색

测试实例类 - 测试类基类、协议

zhudongyong 2 년 전
부모
커밋
6427d33637

+ 16 - 0
KdanAutoTest/KdanAuto.xcodeproj/project.pbxproj

@@ -10,6 +10,8 @@
 		24D70000292B6FD100DAB5EE /* SettingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 24D7FFFF292B6FD100DAB5EE /* SettingViewController.xib */; };
 		24D70004292B94BE00DAB5EE /* TestCaseCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24D70003292B94BE00DAB5EE /* TestCaseCellView.swift */; };
 		24D70006292B98FD00DAB5EE /* TestCaseCellView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 24D70005292B98FD00DAB5EE /* TestCaseCellView.xib */; };
+		24D70009292D14DA00DAB5EE /* AutoTestProtocal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24D70008292D14DA00DAB5EE /* AutoTestProtocal.swift */; };
+		24D7000B292D16BB00DAB5EE /* ChineseStringAutoTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24D7000A292D16BB00DAB5EE /* ChineseStringAutoTest.swift */; };
 		24D7FF9B29261A6400DAB5EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24D7FF9A29261A6400DAB5EE /* AppDelegate.swift */; };
 		24D7FF9D29261A6400DAB5EE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24D7FF9C29261A6400DAB5EE /* ViewController.swift */; };
 		24D7FF9F29261A6600DAB5EE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 24D7FF9E29261A6600DAB5EE /* Assets.xcassets */; };
@@ -64,6 +66,8 @@
 		24D70001292B71FB00DAB5EE /* KdanAutoDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = KdanAutoDebug.entitlements; sourceTree = "<group>"; };
 		24D70003292B94BE00DAB5EE /* TestCaseCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestCaseCellView.swift; sourceTree = "<group>"; };
 		24D70005292B98FD00DAB5EE /* TestCaseCellView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TestCaseCellView.xib; sourceTree = "<group>"; };
+		24D70008292D14DA00DAB5EE /* AutoTestProtocal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoTestProtocal.swift; sourceTree = "<group>"; };
+		24D7000A292D16BB00DAB5EE /* ChineseStringAutoTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChineseStringAutoTest.swift; sourceTree = "<group>"; };
 		24D7FF9729261A6400DAB5EE /* KdanAuto.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KdanAuto.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		24D7FF9A29261A6400DAB5EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 		24D7FF9C29261A6400DAB5EE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
@@ -148,6 +152,15 @@
 			path = Norrmal;
 			sourceTree = "<group>";
 		};
+		24D70007292D141A00DAB5EE /* AutoTestCase */ = {
+			isa = PBXGroup;
+			children = (
+				24D70008292D14DA00DAB5EE /* AutoTestProtocal.swift */,
+				24D7000A292D16BB00DAB5EE /* ChineseStringAutoTest.swift */,
+			);
+			path = AutoTestCase;
+			sourceTree = "<group>";
+		};
 		24D7FF8E29261A6400DAB5EE = {
 			isa = PBXGroup;
 			children = (
@@ -247,6 +260,7 @@
 		24D7FFF8292B4FDB00DAB5EE /* Class */ = {
 			isa = PBXGroup;
 			children = (
+				24D70007292D141A00DAB5EE /* AutoTestCase */,
 				24D70002292B94A100DAB5EE /* Norrmal */,
 				24D7FFFC292B508600DAB5EE /* DataModel */,
 				24D7FFF9292B4FF500DAB5EE /* Setting */,
@@ -493,10 +507,12 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				24D70009292D14DA00DAB5EE /* AutoTestProtocal.swift in Sources */,
 				24D70004292B94BE00DAB5EE /* TestCaseCellView.swift in Sources */,
 				24D7FF9D29261A6400DAB5EE /* ViewController.swift in Sources */,
 				24D7FFFE292B509000DAB5EE /* DataModel.swift in Sources */,
 				24D7FF9B29261A6400DAB5EE /* AppDelegate.swift in Sources */,
+				24D7000B292D16BB00DAB5EE /* ChineseStringAutoTest.swift in Sources */,
 				24D7FFFB292B501100DAB5EE /* SettingViewController.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;

BIN
KdanAutoTest/KdanAuto.xcodeproj/project.xcworkspace/xcuserdata/zhudongyong.xcuserdatad/UserInterfaceState.xcuserstate


+ 21 - 0
KdanAutoTest/KdanAuto/Class/AutoTestCase/AutoTestProtocal.swift

@@ -0,0 +1,21 @@
+//
+//  AutoTestProtocal.swift
+//  KdanAuto
+//
+//  Created by 朱东勇 on 2022/11/22.
+//
+
+import Foundation
+
+protocol AutoTestProtocal : NSObjectProtocol {
+    
+    func type() -> String
+    
+    func keys() -> NSArray
+    func selectedKeys() -> NSArray
+    
+    func setSelectedKeys(_ keys:NSArray)
+    
+    func autoTest()
+    func autoCheck()
+}

+ 45 - 0
KdanAutoTest/KdanAuto/Class/AutoTestCase/ChineseStringAutoTest.swift

@@ -0,0 +1,45 @@
+//
+//  ChineseStringAutoTest.swift
+//  KdanAuto
+//
+//  Created by 朱东勇 on 2022/11/22.
+//
+
+import Foundation
+import Cocoa
+
+class ChineseStringAutoTest : NSObject, AutoTestProtocal {
+    var _selectedKeys : NSArray!
+    
+    
+    func type() -> String {
+        return "PDF2RTF_China_Auto_Test"
+    }
+    
+    func keys() -> NSArray {
+        return ["字符"]
+    }
+    
+    func selectedKeys() -> NSArray {
+        return _selectedKeys
+    }
+    
+    func setSelectedKeys(_ keys: NSArray) {
+        _selectedKeys = keys
+        
+        
+    }
+    
+    
+    
+    // Auto Test refrence Check File
+    func autoTest() {
+        
+    }
+    
+    // Auto Test refrence Latest Status
+    func autoCheck() {
+        
+    }
+    
+}