AutoTestProtocal.swift 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // AutoTestProtocal.swift
  3. // KdanAuto
  4. //
  5. // Created by 朱东勇 on 2022/11/22.
  6. //
  7. import Foundation
  8. enum AutoTestStatus : Int {
  9. case Normal = 0
  10. case Wait = 1
  11. case Process = 2
  12. case Finished = 3
  13. }
  14. protocol AutoTestProtocal : NSObjectProtocol {
  15. // 类型关键字
  16. func fileType() -> String // PPT/RTF/EXCEL/Word/....
  17. func type() -> String
  18. func name() -> String
  19. func keys() -> NSArray
  20. func selectedKeys() -> NSArray
  21. func setSelectedKeys(_ keys:NSArray)
  22. func autoTest()
  23. func testReport() -> NSAttributedString?
  24. /** Default is 0.0, The range of value is [0, 1]
  25. */
  26. func degree() -> Double
  27. // func testReportOfFile(_ fileName:String) -> NSAttributedString?
  28. /** Default is 0.0, The range of value is [0, 1]
  29. */
  30. func degreeOfFile(_ fileName:String) -> Double
  31. /**
  32. Replace the refrence image for next image check test
  33. */
  34. func canUpdateRefImage() -> Bool
  35. func updateRefImage()
  36. func canUpdateRefImage(_ fileName:String) -> Bool
  37. func updateRefImage(_ fileName:String)
  38. func status() -> AutoTestStatus
  39. }