info.plist:
看是Ordinary.storyboard 還是 TabView.storyboard ?
在info.plist:
Main storyboard file base name (macOS): Ordinary
則是Ordinary
==========================================
實際在跑的<project_name>_<station_name>.plist
以branch B495_Pizza為例:
PlistHelper.swift:
func getStationProjectName() -> String {
return "\(self.getProjectName())_\(self.getStationName())"
}
B44445_QT2Flow.swift:
SAP109_MBFlow.swift:
ConcurrentFlow.swift:
...
let stationProjectName = self._plistHelper!.getStationProjectName()
let testList = TestListFactory.getTestList(stationProjectName: stationProjectName)
...
TestListFactory.swift:
class TestListFactory {
static func getTestList(stationProjectName: String) -> ITestList? {
switch stationProjectName {
case "B444445_QT2":
return B444445_QT2List()
...
case "B495_Pizza":
return B495_PizzaList()
...
case "B499_Pizza":
return B499_PizzaList()
case "Test_Pizza": // Temp 20250219
return B495_PizzaList()
default:
return nil
}
}
}
==========================================
FitAutoTest, 找出程式GUI的start,
Ordinary.storyboard點兩下,
Start Btn0 -> Show the Connections inspector
Referencing Outlets
看到叫做startBtn0
Sent Actions
看到Ordinary Controller
dutStart0
OrdinaryController.swift:
@IBAction func dutStart0(_ sender: Any) {
super.handleStartBtnClick(dutIndex: 0)
}
BaseViewController.swift:
...
self.startBtnList = [startBtn0, startBtn1, startBtn2, startBtn3]
func handleStartBtnClick(dutIndex: Int){
...
if self.setUIAfterStart(dutIndex: dutIndex, isAlarm: true) {
...
self.startBtnList[dutIndex].isEnabled = false
self._testflow!.testStart(startTime: startTime, allDutIndexSnMap: [dutIndex: self.snTextFieldList[dutIndex].stringValue])
..
}
}
ITestFlow.swift:
protocol ITestFlow {
...
func testStart(startTime: Date, allDutIndexSnMap: Dictionary<Int, String>) -> ()
}
B444445_QT2Flow.swift:
class B444445_QT2Flow : ITestFlow {
...
func testStart(startTime: Date, allDutIndexSnMap: Dictionary<Int, String>) {
...
for i in 0...plistTestItems.count - 1 {
let pItem = plistTestItems[i]
//add into DispatchGroup
queue.async(group: group) {
let eachfunc = testList!.testItemScript[pItem.Script]
if eachfunc != nil {
...
var resultItem = eachfunc!(container)
...
}
}
沒有留言:
張貼留言