diff --git a/frameworks/test/unittest/BUILD.gn b/frameworks/test/unittest/BUILD.gn index de6cc06fcac7d5eb4d010f0529ccd876aa516353..f8c1773e165d1bb366f18794b2affaa2db3f8948 100644 --- a/frameworks/test/unittest/BUILD.gn +++ b/frameworks/test/unittest/BUILD.gn @@ -14,7 +14,7 @@ import("//build/test.gni") import("//foundation/resourceschedule/work_scheduler/workscheduler.gni") -module_output_path = "work_scheduler/work_info_unittest" +module_output_path = "work_scheduler/work_scheduler" ohos_systemtest("WorkSchedulerWorkInfoTest") { module_out_path = module_output_path diff --git a/frameworks/test/unittest/src/work_sched_client_test.cpp b/frameworks/test/unittest/src/work_sched_client_test.cpp index e5cc3cd5ff6d7cf8efbbdf58e83c63f8466020c0..c0826ae21c7c7d3a3c85f973efc9025d3f528ff4 100644 --- a/frameworks/test/unittest/src/work_sched_client_test.cpp +++ b/frameworks/test/unittest/src/work_sched_client_test.cpp @@ -40,7 +40,7 @@ public: * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_001, TestSize.Level1) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_001, TestSize.Level0) { WorkInfo workInfo = WorkInfo(); auto ret = WorkSchedulerSrvClient::GetInstance().StartWork(workInfo); @@ -53,7 +53,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_001, TestSize.Level1) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_002, TestSize.Level1) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_002, TestSize.Level0) { WorkInfo workInfo = WorkInfo(); auto ret = WorkSchedulerSrvClient::GetInstance().StopWork(workInfo); @@ -66,7 +66,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_002, TestSize.Level1) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_003, TestSize.Level1) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_003, TestSize.Level0) { WorkInfo workInfo = WorkInfo(); auto ret = WorkSchedulerSrvClient::GetInstance().StopAndCancelWork(workInfo); @@ -79,7 +79,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_003, TestSize.Level1) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_004, TestSize.Level1) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_004, TestSize.Level0) { auto ret = WorkSchedulerSrvClient::GetInstance().StopAndClearWorks(); EXPECT_EQ(ret, ERR_OK); @@ -91,7 +91,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_004, TestSize.Level1) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_005, TestSize.Level1) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_005, TestSize.Level0) { int32_t workId = 1; bool result; @@ -105,7 +105,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_005, TestSize.Level1) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_006, TestSize.Level1) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_006, TestSize.Level0) { int32_t workId = 1; std::shared_ptr work; @@ -122,7 +122,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_006, TestSize.Level1) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_007, TestSize.Level1) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_007, TestSize.Level0) { std::list> workInfos; ErrCode ret = WorkSchedulerSrvClient::GetInstance().ObtainAllWorks(workInfos); @@ -135,7 +135,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_007, TestSize.Level1) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_008, TestSize.Level1) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_008, TestSize.Level0) { sptr sam = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); sptr remoteObject_ = sam->CheckSystemAbility(WORK_SCHEDULE_SERVICE_ID); @@ -153,7 +153,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_008, TestSize.Level1) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_009, TestSize.Level1) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_009, TestSize.Level0) { sptr sam = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); sptr remoteObject_ = sam->CheckSystemAbility(WORK_SCHEDULE_SERVICE_ID); @@ -169,7 +169,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_009, TestSize.Level1) * @tc.type: FUNC * @tc.require: issue:#I992IA */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_010, TestSize.Level1) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_010, TestSize.Level0) { int32_t uid = -1; ErrCode ret = WorkSchedulerSrvClient::GetInstance().PauseRunningWorks(uid); @@ -182,7 +182,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_010, TestSize.Level1) * @tc.type: FUNC * @tc.require: issue:#I992IA */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_011, TestSize.Level1) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_011, TestSize.Level0) { int32_t uid = IPCSkeleton::GetCallingUid(); ErrCode ret = WorkSchedulerSrvClient::GetInstance().PauseRunningWorks(uid); @@ -195,7 +195,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_011, TestSize.Level1) * @tc.type: FUNC * @tc.require: issue:#I992IA */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_012, TestSize.Level1) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_012, TestSize.Level0) { int32_t uid = -1; ErrCode ret = WorkSchedulerSrvClient::GetInstance().ResumePausedWorks(uid); @@ -208,7 +208,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_012, TestSize.Level1) * @tc.type: FUNC * @tc.require: issue:#I992IA */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_013, TestSize.Level1) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_013, TestSize.Level0) { int32_t uid = IPCSkeleton::GetCallingUid(); ErrCode ret = WorkSchedulerSrvClient::GetInstance().ResumePausedWorks(uid); @@ -221,7 +221,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_013, TestSize.Level1) * @tc.type: FUNC * @tc.require: issue:#I9EKGI */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_014, TestSize.Level1) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_014, TestSize.Level0) { std::list> workInfos; ErrCode ret = WorkSchedulerSrvClient::GetInstance().GetAllRunningWorks(workInfos); @@ -234,7 +234,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_014, TestSize.Level1) * @tc.type: FUNC * @tc.require: issue:#I9EKGI */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_015, TestSize.Level1) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_015, TestSize.Level0) { int32_t sourceType = 1; std::string configData = ""; diff --git a/frameworks/test/unittest/src/workinfo_test.cpp b/frameworks/test/unittest/src/workinfo_test.cpp index 742488d32144a98e5be34a1f2985b6a4f4a895f9..bcc1d250d40a1c33b3588ad7b6a482ac17d4dac0 100644 --- a/frameworks/test/unittest/src/workinfo_test.cpp +++ b/frameworks/test/unittest/src/workinfo_test.cpp @@ -48,7 +48,7 @@ void WorkInfoTest::TearDown() * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest001, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest001, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); workInfo.SetWorkId(1); @@ -61,7 +61,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest001, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest002, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest002, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); workInfo.SetElement("bundle_name", "ability_name"); @@ -75,7 +75,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest002, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest003, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest003, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); workInfo.RequestPersisted(true); @@ -90,7 +90,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest003, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest004, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest004, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); EXPECT_EQ(workInfo.GetChargerType(), WorkCondition::Charger::CHARGING_UNKNOWN); @@ -104,7 +104,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest004, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest005, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest005, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); workInfo.RequestChargerType(false, WorkCondition::Charger::CHARGING_UNPLUGGED); @@ -117,7 +117,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest005, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest006, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest006, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); workInfo.RequestBatteryStatus(WorkCondition::BatteryStatus::BATTERY_STATUS_LOW_OR_OKAY); @@ -130,7 +130,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest006, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest007, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest007, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); workInfo.RequestBatteryStatus(WorkCondition::BatteryStatus::BATTERY_STATUS_LOW); @@ -143,7 +143,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest007, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest008, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest008, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); EXPECT_EQ(workInfo.GetBatteryStatus(), WorkCondition::BatteryStatus::BATTERY_UNKNOWN); @@ -157,7 +157,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest008, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: SR000GGTN9 AR000GH89M */ -HWTEST_F (WorkInfoTest, WorkInfoTest009, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest009, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); EXPECT_EQ(workInfo.GetStorageLevel(), WorkCondition::Storage::STORAGE_UNKNOWN); @@ -171,7 +171,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest009, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: SR000GGTN8 AR000GH89J AR000GH89K AR000GH89L */ -HWTEST_F (WorkInfoTest, WorkInfoTest010, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest010, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); workInfo.RequestStorageLevel(WorkCondition::Storage::STORAGE_LEVEL_LOW); @@ -184,7 +184,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest010, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: SR000GGTNB AR000GH89Q */ -HWTEST_F (WorkInfoTest, WorkInfoTest011, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest011, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); workInfo.RequestStorageLevel(WorkCondition::Storage::STORAGE_LEVEL_OKAY); @@ -197,7 +197,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest011, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: SR000GGTNA AR000GH89P AR000GH89N AR000GH89O */ -HWTEST_F (WorkInfoTest, WorkInfoTest012, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest012, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); EXPECT_EQ(workInfo.GetNetworkType(), WorkCondition::Network::NETWORK_UNKNOWN); @@ -211,7 +211,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest012, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: SR000GGTNA AR000GH89P AR000GH89N AR000GH89O */ -HWTEST_F (WorkInfoTest, WorkInfoTest013, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest013, Function | MediumTest | Level2) { uint32_t timeInterval = 120; WorkInfo workInfo = WorkInfo(); @@ -229,7 +229,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest013, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: SR000GGTNA AR000GH89P AR000GH89N AR000GH89O */ -HWTEST_F (WorkInfoTest, WorkInfoTest014, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest014, Function | MediumTest | Level2) { uint32_t timeInterval = 120; WorkInfo workInfo = WorkInfo(); @@ -246,7 +246,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest014, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest015, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest015, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); EXPECT_EQ(workInfo.GetBatteryLevel(), INVALID_VALUE); @@ -260,7 +260,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest015, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest016, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest016, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); workInfo.RefreshUid(0); @@ -273,7 +273,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest016, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest017, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest017, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); AAFwk::WantParams extras; @@ -292,7 +292,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest017, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest018, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest018, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); workInfo.GetConditionMap(); @@ -307,7 +307,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest018, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTestJson001, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTestJson001, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); std::string res = workInfo.ParseToJsonStr(); @@ -345,7 +345,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTestJson001, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTestJson002, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTestJson002, Function | MediumTest | Level2) { using namespace OHOS::WorkScheduler; WorkInfo workInfo = WorkInfo(); @@ -402,7 +402,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTestJson002, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTestJson003, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTestJson003, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); Json::Value root; @@ -459,7 +459,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTestJson003, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTestJson004, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTestJson004, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); Json::Value root; @@ -485,7 +485,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTestJson004, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTestJson005, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTestJson005, Function | MediumTest | Level2) { using namespace OHOS::WorkScheduler; WorkInfo workInfo = WorkInfo(); @@ -512,7 +512,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTestJson005, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTestJson006, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTestJson006, Function | MediumTest | Level2) { using namespace OHOS::WorkScheduler; WorkInfo workInfo = WorkInfo(); @@ -551,7 +551,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTestJson006, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest019, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest019, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); workInfo.SetElement("bundle_name", "ability_name"); @@ -599,7 +599,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest019, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest020, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest020, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); workInfo.SetElement("bundle_name", "ability_name"); @@ -632,7 +632,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest020, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest021, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest021, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); workInfo.SetCallBySystemApp(true); @@ -645,7 +645,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest021, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest022, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkInfoTest022, Function | MediumTest | Level2) { WorkInfo workInfo = WorkInfo(); time_t result; @@ -661,7 +661,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest022, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkSchedUtils001, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkSchedUtils001, Function | MediumTest | Level2) { int32_t res = WorkSchedUtils::GetCurrentAccountId(); EXPECT_NE(res, -1000); @@ -673,7 +673,7 @@ HWTEST_F (WorkInfoTest, WorkSchedUtils001, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkSchedUtils002, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkSchedUtils002, Function | MediumTest | Level2) { bool res = WorkSchedUtils::IsIdActive(0); EXPECT_FALSE(res); @@ -685,7 +685,7 @@ HWTEST_F (WorkInfoTest, WorkSchedUtils002, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkSchedUtils003, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkSchedUtils003, Function | MediumTest | Level2) { int32_t res = WorkSchedUtils::GetUserIdByUid(1); EXPECT_EQ(res, 0); @@ -699,7 +699,7 @@ HWTEST_F (WorkInfoTest, WorkSchedUtils003, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkSchedUtils004, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkSchedUtils004, Function | MediumTest | Level2) { std::string partialPath; std::string fullPath; @@ -725,7 +725,7 @@ HWTEST_F (WorkInfoTest, WorkSchedUtils004, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkSchedUtils006, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, WorkSchedUtils006, Function | MediumTest | Level2) { bool res = WorkSchedUtils::IsSystemApp(); EXPECT_EQ(res, false); @@ -737,7 +737,7 @@ HWTEST_F (WorkInfoTest, WorkSchedUtils006, Function | MediumTest | Level0) * @tc.type FUNC * @tc.require: issueIAHY0B */ -HWTEST_F (WorkInfoTest, GetSaId001, Function | MediumTest | Level0) +HWTEST_F (WorkInfoTest, GetSaId001, Function | MediumTest | Level2) { int32_t saId = 5300; WorkInfo workInfo = WorkInfo(); diff --git a/interfaces/test/unittest/work_scheduler_jsunittest/BUILD.gn b/interfaces/test/unittest/work_scheduler_jsunittest/BUILD.gn index 8f0e6ec993cb26f6ece401f33238b4ab520bcb27..40b1a709a8ce723c7c84757bba5eccfdea6d5d8b 100644 --- a/interfaces/test/unittest/work_scheduler_jsunittest/BUILD.gn +++ b/interfaces/test/unittest/work_scheduler_jsunittest/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/test.gni") -module_output_path = "work_scheduler/interfaces" +module_output_path = "work_scheduler/work_scheduler" ohos_js_unittest("WorkSchedulerJsTest") { module_out_path = module_output_path diff --git a/services/test/BUILD.gn b/services/test/BUILD.gn index 6fe65a2d165b59ea897a19b42630bd624cb70006..847306980793704c91608e7638054c1c39ad3837 100644 --- a/services/test/BUILD.gn +++ b/services/test/BUILD.gn @@ -15,7 +15,7 @@ import("//build/config/features.gni") import("//build/test.gni") import("//foundation/resourceschedule/work_scheduler/workscheduler.gni") -module_output_path = "work_scheduler/unittest" +module_output_path = "work_scheduler/work_scheduler" config("worksched_private_config") { include_dirs = [ "${worksched_service_path}/zidl/include", diff --git a/services/test/src/event_publisher_test.cpp b/services/test/src/event_publisher_test.cpp index 20a5729ce7331bf459462b19649370bc083c631b..dd74e8839725bb4a0dca5fd7025913301d1e280a 100644 --- a/services/test/src/event_publisher_test.cpp +++ b/services/test/src/event_publisher_test.cpp @@ -46,7 +46,7 @@ void EventPublisherTest::SetUpTestCase() * @tc.type: FUNC * @tc.require: I8GHCL */ -HWTEST_F(EventPublisherTest, publishEvent_001, TestSize.Level1) +HWTEST_F(EventPublisherTest, publishEvent_001, TestSize.Level3) { std::string result; std::string eventType; @@ -55,7 +55,7 @@ HWTEST_F(EventPublisherTest, publishEvent_001, TestSize.Level1) EXPECT_EQ(result, std::string("dump -d need right params.")); } -HWTEST_F(EventPublisherTest, Dump_001, TestSize.Level1) +HWTEST_F(EventPublisherTest, Dump_001, TestSize.Level3) { std::vector> infos = { {"event", "info"}, diff --git a/services/test/src/scheduler_bg_task_subscriber_test.cpp b/services/test/src/scheduler_bg_task_subscriber_test.cpp index 0bc4b045985f0fc086f61080da9bab07366f2ab8..70115ba9b7f01243cb66932624d18e0f8ccec898 100644 --- a/services/test/src/scheduler_bg_task_subscriber_test.cpp +++ b/services/test/src/scheduler_bg_task_subscriber_test.cpp @@ -45,7 +45,7 @@ void SchedulerBgTaskSubscriberTest::SetUpTestCase() * @tc.type: FUNC * @tc.require: I8JBRY */ -HWTEST_F(SchedulerBgTaskSubscriberTest, OnRemoteDied_001, TestSize.Level1) +HWTEST_F(SchedulerBgTaskSubscriberTest, OnRemoteDied_001, TestSize.Level3) { schedulerBgTaskSubscriber_->OnRemoteDied(nullptr); EXPECT_TRUE(schedulerBgTaskSubscriber_ != nullptr); diff --git a/services/test/src/watchdog_test.cpp b/services/test/src/watchdog_test.cpp index aacb57c9427a974ad03c07d90e47f435db5f1715..b3dd56b2320f307b0a28f48bdb16fead1babbd74 100644 --- a/services/test/src/watchdog_test.cpp +++ b/services/test/src/watchdog_test.cpp @@ -49,7 +49,7 @@ void WatchdogTest::SetUpTestCase() * @tc.type: FUNC * @tc.require: I8JBRY */ -HWTEST_F(WatchdogTest, watchdog_001, TestSize.Level1) +HWTEST_F(WatchdogTest, watchdog_001, TestSize.Level3) { bool result = watchdog_->AddWatchdog(1, 1); EXPECT_EQ(result, false); @@ -61,7 +61,7 @@ HWTEST_F(WatchdogTest, watchdog_001, TestSize.Level1) * @tc.type: FUNC * @tc.require: I8JBRY */ -HWTEST_F(WatchdogTest, watchdog_002, TestSize.Level1) +HWTEST_F(WatchdogTest, watchdog_002, TestSize.Level3) { bool result = watchdog_->AddWatchdog(1, 1); EXPECT_EQ(result, false); @@ -74,7 +74,7 @@ HWTEST_F(WatchdogTest, watchdog_002, TestSize.Level1) * @tc.type: FUNC * @tc.require: I8JBRY */ -HWTEST_F(WatchdogTest, watchdog_003, TestSize.Level1) +HWTEST_F(WatchdogTest, watchdog_003, TestSize.Level3) { AppExecFwk::InnerEvent::Pointer event = AppExecFwk::InnerEvent::Get(0); event = nullptr; @@ -88,7 +88,7 @@ HWTEST_F(WatchdogTest, watchdog_003, TestSize.Level1) * @tc.type: FUNC * @tc.require: I8JBRY */ -HWTEST_F(WatchdogTest, watchdog_004, TestSize.Level1) +HWTEST_F(WatchdogTest, watchdog_004, TestSize.Level3) { AppExecFwk::InnerEvent::Pointer event = AppExecFwk::InnerEvent::Get(0); watchdog_->ProcessEvent(event); @@ -101,7 +101,7 @@ HWTEST_F(WatchdogTest, watchdog_004, TestSize.Level1) * @tc.type: FUNC * @tc.require: I8JBRY */ -HWTEST_F(WatchdogTest, watchdog_005, TestSize.Level1) +HWTEST_F(WatchdogTest, watchdog_005, TestSize.Level3) { AppExecFwk::InnerEvent::Pointer event = AppExecFwk::InnerEvent::Get(0); watchdog_->service_ = nullptr; diff --git a/services/test/src/work_conn_manager_test.cpp b/services/test/src/work_conn_manager_test.cpp index 3452515d300f363f40282e2c2d5e5de65b38db1c..a520f3f7da9b2183c1e1df025f4f3a78c4e26c45 100644 --- a/services/test/src/work_conn_manager_test.cpp +++ b/services/test/src/work_conn_manager_test.cpp @@ -54,7 +54,7 @@ void WorkConnManagerTest::SetUpTestCase() * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, AddConnInfo_001, TestSize.Level1) +HWTEST_F(WorkConnManagerTest, AddConnInfo_001, TestSize.Level2) { string workId = "u1000_123"; sptr connection; @@ -68,7 +68,7 @@ HWTEST_F(WorkConnManagerTest, AddConnInfo_001, TestSize.Level1) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, RemoveConnInfo_001, TestSize.Level1) +HWTEST_F(WorkConnManagerTest, RemoveConnInfo_001, TestSize.Level2) { string workId = "u1000_123"; sptr connection; @@ -83,7 +83,7 @@ HWTEST_F(WorkConnManagerTest, RemoveConnInfo_001, TestSize.Level1) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, GetConnInfo_001, TestSize.Level1) +HWTEST_F(WorkConnManagerTest, GetConnInfo_001, TestSize.Level2) { string workId = "u1000_123"; sptr connection; @@ -98,7 +98,7 @@ HWTEST_F(WorkConnManagerTest, GetConnInfo_001, TestSize.Level1) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, GetConnInfo_002, TestSize.Level1) +HWTEST_F(WorkConnManagerTest, GetConnInfo_002, TestSize.Level2) { workConnManager_->connMap_.clear(); string workId = "u1000_123"; @@ -112,7 +112,7 @@ HWTEST_F(WorkConnManagerTest, GetConnInfo_002, TestSize.Level1) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, StartWork_001, TestSize.Level1) +HWTEST_F(WorkConnManagerTest, StartWork_001, TestSize.Level2) { string workId = "u1000_123"; sptr connection; @@ -134,7 +134,7 @@ HWTEST_F(WorkConnManagerTest, StartWork_001, TestSize.Level1) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, StartWork_002, TestSize.Level1) +HWTEST_F(WorkConnManagerTest, StartWork_002, TestSize.Level2) { WorkInfo workInfo; workInfo.workId_ = 123; @@ -152,7 +152,7 @@ HWTEST_F(WorkConnManagerTest, StartWork_002, TestSize.Level1) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, DisConnect_001, TestSize.Level1) +HWTEST_F(WorkConnManagerTest, DisConnect_001, TestSize.Level2) { sptr connection; bool ret = workConnManager_->DisConnect(connection); @@ -165,7 +165,7 @@ HWTEST_F(WorkConnManagerTest, DisConnect_001, TestSize.Level1) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, StopWork_001, TestSize.Level1) +HWTEST_F(WorkConnManagerTest, StopWork_001, TestSize.Level2) { workConnManager_->connMap_.clear(); WorkInfo workInfo; @@ -184,7 +184,7 @@ HWTEST_F(WorkConnManagerTest, StopWork_001, TestSize.Level1) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, StopWork_002, TestSize.Level1) +HWTEST_F(WorkConnManagerTest, StopWork_002, TestSize.Level2) { string workId = "u1000_123"; sptr connection; @@ -206,7 +206,7 @@ HWTEST_F(WorkConnManagerTest, StopWork_002, TestSize.Level1) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, StopWork_003, TestSize.Level1) +HWTEST_F(WorkConnManagerTest, StopWork_003, TestSize.Level2) { MyWorkConnManager myWorkConnManager; @@ -231,7 +231,7 @@ HWTEST_F(WorkConnManagerTest, StopWork_003, TestSize.Level1) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, StopWork_004, TestSize.Level1) +HWTEST_F(WorkConnManagerTest, StopWork_004, TestSize.Level2) { MyWorkConnManager myWorkConnManager; @@ -256,7 +256,7 @@ HWTEST_F(WorkConnManagerTest, StopWork_004, TestSize.Level1) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, WriteStartWorkEvent_001, TestSize.Level1) +HWTEST_F(WorkConnManagerTest, WriteStartWorkEvent_001, TestSize.Level2) { WorkInfo workInfo; workInfo.workId_ = 123; diff --git a/services/test/src/work_sched_config_test.cpp b/services/test/src/work_sched_config_test.cpp index 128aa897028395013bb19ce3922e4817fe1f39e1..f19a0447f1b2f1abef0d704d7cdab983f74eaf84 100644 --- a/services/test/src/work_sched_config_test.cpp +++ b/services/test/src/work_sched_config_test.cpp @@ -45,7 +45,7 @@ public: * @tc.type: FUNC * @tc.require: I8GHCL */ -HWTEST_F(WorkSchedConfigTest, InitActiveGroupWhitelist_001, TestSize.Level1) +HWTEST_F(WorkSchedConfigTest, InitActiveGroupWhitelist_001, TestSize.Level3) { std::string configData = ""; DelayedSingleton::GetInstance()->InitActiveGroupWhitelist(configData);