จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ผู้เตรียมเป้าหมายการเรียกใช้บนรอง
public
class
RunOnSecondaryUserTargetPreparer
extends BaseTargetPreparer
implements
IConfigurationReceiver
ITargetPreparer
ที่สร้างผู้ใช้รองในการตั้งค่า และทำเครื่องหมายการทดสอบที่ควรจะเป็น
ในผู้ใช้รายนั้น
ระบบจะนำผู้ใช้รองออกในการล้างข้อมูล
หากมีผู้ใช้รองอยู่แล้ว ระบบจะใช้ผู้ใช้ดังกล่าวแทนการสร้างผู้ใช้ใหม่
จะไม่ถูกลบเมื่อถอดออก
หากอุปกรณ์ไม่สามารถสร้างผู้ใช้ใหม่ได้เมื่อจำเป็น
ระบบจะตั้งค่าการข้ามการทดสอบอาร์กิวเมนต์สำหรับการวัดคุม และจะไม่มีการเปลี่ยนแปลงผู้ใช้ การทดสอบ
ที่ทำงานอยู่บนอุปกรณ์จะสามารถอ่านอาร์กิวเมนต์นี้เพื่อตอบสนองต่อสถานะนี้ได้
สรุป
วิธีการป้องกัน |
boolean
|
canCreateAdditionalUsers(ITestDevice device, int numberOfUsers)
จะตรวจสอบว่าสามารถสร้างจำนวนผู้ใช้ที่ต้องการได้หรือไม่
|
ช่างก่อสร้างสาธารณะ
ผู้เตรียมเป้าหมายการเรียกใช้บนรอง
public RunOnSecondaryUserTargetPreparer ()
วิธีการสาธารณะ
ตั้งค่าการกำหนดค่า
public void setConfiguration (IConfiguration configuration)
แทรก IConfiguration
ที่ใช้งานอยู่
พารามิเตอร์ |
configuration |
IConfiguration |
public void setUp (TestInformation testInfo)
พารามิเตอร์ |
testInfo |
TestInformation |
การขว้าง |
DeviceNotAvailableException |
|
TargetSetupError |
|
public void tearDown (TestInformation testInfo,
Throwable e)
พารามิเตอร์ |
testInfo |
TestInformation |
e |
Throwable |
การขว้าง |
DeviceNotAvailableException |
|
วิธีการป้องกัน
สร้างผู้ใช้เพิ่มเติมได้
protected boolean canCreateAdditionalUsers (ITestDevice device,
int numberOfUsers)
จะตรวจสอบว่าสามารถสร้างจำนวนผู้ใช้ที่ต้องการได้หรือไม่
พารามิเตอร์ |
device |
ITestDevice |
numberOfUsers |
int |
การขว้าง |
DeviceNotAvailableException |
|
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-08-22 UTC
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"ไม่มีข้อมูลที่ฉันต้องการ"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"ล้าสมัย"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"ปัญหาเกี่ยวกับการแปล"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"อื่นๆ"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"เข้าใจง่าย"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"แก้ปัญหาของฉันได้"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"อื่นๆ"
}]
{"lastModified": "\u0e2d\u0e31\u0e1b\u0e40\u0e14\u0e15\u0e25\u0e48\u0e32\u0e2a\u0e38\u0e14 2024-08-22 UTC"}
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2024-08-22 UTC"]]