mirror of
https://gitlab.com/YuukiPS/GSServer-CBT.git
synced 2025-08-05 11:17:05 +03:00
melon
This commit is contained in:
26
soggy_resources/lua/UAuto/TestCases/number/NumberBase.lua
Normal file
26
soggy_resources/lua/UAuto/TestCases/number/NumberBase.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
local UAutoLuaTestCase = class("NumberBase",baseClass)
|
||||
|
||||
UAutoLuaTestCase.base = TestCaseNumberBaseClass()
|
||||
|
||||
local self = UAutoLuaTestCase
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return self
|
@@ -0,0 +1,239 @@
|
||||
--baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Number/NumberBase')
|
||||
--所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("AvatarReliquaryTest",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "AvatarReliquaryTest"
|
||||
self.Category = "数值"
|
||||
self.Description="圣遗物升级角色数值验证"
|
||||
|
||||
|
||||
local avatarLevel=90
|
||||
local avatarPromoteLevel = 4
|
||||
local step=2
|
||||
|
||||
--装备id列表 --沙,羽,冠,花,杯
|
||||
--绿装+1, 蓝装+2,紫装+3,橙装+4。
|
||||
--2阶+100,3阶+200,4阶+300。
|
||||
local ReliquaryList_base = {51100,51110,51120,51130,51140}
|
||||
--生命套装 +0
|
||||
--攻击套装+1000
|
||||
--防御套装+2000
|
||||
--强击套装+3000
|
||||
--激怒套装+4000
|
||||
--制裁套装+5000
|
||||
--护佑套装+6000
|
||||
--稳固套装+7000
|
||||
--吸血套装+8000
|
||||
--反击套装+9000
|
||||
--颂歌套装+10000
|
||||
--热血套装+11000
|
||||
--激昂套装+12000
|
||||
--暴走套装+13000
|
||||
--治愈套装+14000
|
||||
|
||||
|
||||
--天空套装id列表 --沙,羽,冠,花,杯
|
||||
--只有5阶,绿装+1, 蓝装+2,紫装+3,橙装+4。
|
||||
local ReliquaryList_sky = {97400,97410,97420,97430,97440}
|
||||
|
||||
|
||||
|
||||
function self:CheckReliqueryInRange(idAppend)
|
||||
local levelMax = 10
|
||||
local upLevelStep = 3
|
||||
|
||||
for i = 1, #ReliquaryList_base do
|
||||
local id = ReliquaryList_base[i] + idAppend
|
||||
yield_return(CS.UnityEngine.WaitForEndOfFrame())
|
||||
for level=1,levelMax,upLevelStep do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
self.base:SetUpEquipedReliquery()
|
||||
local combatPropertyBefore = self.base:GetEntityCombatProperty()
|
||||
local rank = math.random(0,4)
|
||||
local breakLevel = math.random(0,3)
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self.base:RunGM("equip add "..tostring(id+rank) .." ".. level .. " "..breakLevel))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
self.base:CheckAvatarReliqueryProp(combatPropertyBefore,i-1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
self.ReliquaryLife = {
|
||||
Order = 1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="生命套,白,绿,蓝,紫,橙升级突破数值(随机抽查)验证测试",
|
||||
Action = UAutoCoroutine(function()
|
||||
--yield_return(self:FinishAllNoob())
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:RunGM("Player Level 70"))
|
||||
yield_return(self.base:RunGM("break "..avatarPromoteLevel))
|
||||
yield_return(self.base:RunGM("level "..avatarLevel))
|
||||
yield_return(self.base:RunGM("equip add 10011 90 4"))
|
||||
local baseHP = self.base:GetFloatPropertyValue("maxHP")
|
||||
self.base:SetAvatarHpBase(baseHP)
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
self:CheckReliqueryInRange(0)
|
||||
|
||||
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
-- self.ReliquaryAttack = {
|
||||
-- Order = 2,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description="攻击套,白,绿,蓝,紫,橙升级突破数值(随机抽查)验证测试",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- self:CheckReliqueryInRange(1000)
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
-- self.ReliquaryDefense = {
|
||||
-- Order = 3,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description="防御套,白,绿,蓝,紫,橙升级突破数值(随机抽查)验证测试",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- self:CheckReliqueryInRange(2000)
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
|
||||
-- self.ReliquaryCritical = {
|
||||
-- Order = 4,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description="强击套,白,绿,蓝,紫,橙升级突破数值(随机抽查)验证测试",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- self:CheckReliqueryInRange(3000)
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
|
||||
-- self.ReliquaryCriticalHurt = {
|
||||
-- Order = 5,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description="激怒套,白,绿,蓝,紫,橙升级突破数值(随机抽查)验证测试",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- self:CheckReliqueryInRange(4000)
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
-- self.ReliquaryAddHurt = {
|
||||
-- Order = 6,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description="制裁套,白,绿,蓝,紫,橙升级突破数值(随机抽查)验证测试",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- self:CheckReliqueryInRange(5000)
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
-- self.ReliquaryMinusHurt = {
|
||||
-- Order = 7,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description="护佑套,白,绿,蓝,紫,橙升级突破数值(随机抽查)验证测试",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- self:CheckReliqueryInRange(6000)
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
|
||||
-- self.ReliquaryANTI_CRITICAL = {
|
||||
-- Order = 7,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description="稳固套,白,绿,蓝,紫,橙升级突破数值(随机抽查)验证测试",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- self:CheckReliqueryInRange(7000)
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- self.ReliquarySong = {
|
||||
-- Order = 10,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description="颂歌套,白,绿,蓝,紫,橙升级突破数值(随机抽查)验证测试",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- self:CheckReliqueryInRange(10000)
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
|
||||
|
||||
|
||||
-- self.ReliquaryRexue = {
|
||||
-- Order = 11,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description="热血套,白,绿,蓝,紫,橙升级突破数值(随机抽查)验证测试",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- self:CheckReliqueryInRange(11000)
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
|
||||
-- self.ReliquaryJiHang = {
|
||||
-- Order = 12,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description="激昂套,白,绿,蓝,紫,橙升级突破数值(随机抽查)验证测试",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- self:CheckReliqueryInRange(12000)
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
|
||||
-- self.ReliquaryBaozou = {
|
||||
-- Order = 13,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description="暴走套,白,绿,蓝,紫,橙升级突破数值(随机抽查)验证测试",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- self:CheckReliqueryInRange(13000)
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
|
||||
-- self.ReliquaryHeal = {
|
||||
-- Order = 14,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description="治愈套,白,绿,蓝,紫,橙升级突破数值(随机抽查)验证测试",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- self:CheckReliqueryInRange(14000)
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
|
||||
-- self.ReliquarySky = {
|
||||
-- Order = 15,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description="天空套,白,绿,蓝,紫,橙升级突破数值(随机抽查)验证测试",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- local levelMax = 10
|
||||
-- local upLevelStep = 3
|
||||
|
||||
-- for i = 1, #ReliquaryList_sky do
|
||||
-- local id = ReliquaryList_sky[i]
|
||||
-- yield_return(CS.UnityEngine.WaitForEndOfFrame())
|
||||
-- for level=1,levelMax,upLevelStep do
|
||||
-- self.base:SetUpEquipedReliquery()
|
||||
-- local combatPropertyBefore = self.base:GetEntityCombatProperty()
|
||||
-- yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
-- local rank = math.random(0,4)
|
||||
-- local breakLevel = math.random(0,3)
|
||||
-- yield_return(self.base:RunGM("equip add "..tostring(id+rank) .." ".. level .. " "..breakLevel))
|
||||
-- yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
-- self.base:CheckAvatarReliqueryProp(combatPropertyBefore,i-1)
|
||||
-- yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
-- end
|
||||
-- end
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
|
||||
|
||||
return self
|
@@ -0,0 +1,151 @@
|
||||
--baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Number/NumberBase')
|
||||
--所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("AvatarTalent",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "AvatarTalent"
|
||||
self.Category = "数值"
|
||||
self.Description="角色数值型天赋验证"
|
||||
|
||||
function self:CheckTalent(avatar, talentIDList)
|
||||
|
||||
yield_return(self:ChangeAvatar(avatar,true))
|
||||
local baseHP = self.base:GetFloatPropertyValue("maxHP")
|
||||
self.base:SetAvatarHpBase(baseHP)
|
||||
|
||||
for i = 1, #talentIDList do
|
||||
local id = talentIDList[i]
|
||||
local cmd = "talent unlock "..tostring(id)
|
||||
local combatPropertyBefore = self.base:GetEntityCombatProperty()
|
||||
yield_return(self.base:RunGM(cmd))
|
||||
yield_return(self.base:CheckAvatarTalent(combatPropertyBefore,id,0))
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
self.AnboTalentCheck = {
|
||||
Order = 1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="安柏天赋验证",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:FinishAllNoob())
|
||||
local avatar="Anbo"
|
||||
local TalentIds={1000,1001,1002,1003}
|
||||
self:CheckTalent(avatar, TalentIds)
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.LisaTalentCheck = {
|
||||
Order = 2,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="丽莎天赋验证",
|
||||
Action = UAutoCoroutine(function()
|
||||
local avatar="Lisa"
|
||||
local TalentIds={1100,1101,1102,1103}
|
||||
self:CheckTalent(avatar, TalentIds)
|
||||
end)
|
||||
}
|
||||
|
||||
self.KeayaTalentCheck = {
|
||||
Order = 3,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="凯亚天赋验证",
|
||||
Action = UAutoCoroutine(function()
|
||||
local avatar="Kaeya"
|
||||
local TalentIds={1050,1051,1052,1053}
|
||||
self:CheckTalent(avatar, TalentIds)
|
||||
end)
|
||||
}
|
||||
|
||||
self.QinTalentCheck = {
|
||||
Order = 4,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="琴天赋验证",
|
||||
Action = UAutoCoroutine(function()
|
||||
local avatar="Qin"
|
||||
local TalentIds={1300,1301,1302,1303,1330,1331,1332}
|
||||
self:CheckTalent(avatar, TalentIds)
|
||||
end)
|
||||
}
|
||||
|
||||
-- self.DilucTalentCheck = {
|
||||
-- Order = 5,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description="迪卢克天赋验证",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- local avatar="Diluc"
|
||||
-- local TalentIds={1400,1401,1402,1403,1420,1421,1422}
|
||||
-- self:CheckTalent(avatar, TalentIds)
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
|
||||
|
||||
self.PlayerGirlTalentCheck = {
|
||||
Order = 6,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="女主天赋验证",
|
||||
Action = UAutoCoroutine(function()
|
||||
local avatar="PlayerGirl"
|
||||
yield_return(self:ChangeAvatar(avatar,true))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self.base:RunGM("skill depot 704"))
|
||||
local TalentIds={1481,1482,1483,1484}
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
self:CheckTalent(avatar, TalentIds)
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
|
||||
self.BarbaraTalentCheck = {
|
||||
Order = 7,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="芭芭拉天赋验证",
|
||||
Action = UAutoCoroutine(function()
|
||||
local avatar="Barbara"
|
||||
local TalentIds={1560,1561,1562}
|
||||
self:CheckTalent(avatar, TalentIds)
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.RazorTalentCheck = {
|
||||
Order = 8,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="雷泽天赋验证",
|
||||
Action = UAutoCoroutine(function()
|
||||
local avatar="Razor"
|
||||
local TalentIds={2011,2012,2013,2014}
|
||||
self:CheckTalent(avatar, TalentIds)
|
||||
end)
|
||||
}
|
||||
|
||||
self.VentiTalentCheck = {
|
||||
Order = 9,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="温迪天赋验证",
|
||||
Action = UAutoCoroutine(function()
|
||||
local avatar="Venti"
|
||||
local TalentIds={2211,2212}
|
||||
self:CheckTalent(avatar, TalentIds)
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.XianglingTalentCheck = {
|
||||
Order = 10,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="香菱天赋验证",
|
||||
Action = UAutoCoroutine(function()
|
||||
local avatar="Xiangling"
|
||||
local TalentIds={2311,2312,2313,2314}
|
||||
self:CheckTalent(avatar, TalentIds)
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
|
||||
return self
|
@@ -0,0 +1,172 @@
|
||||
--baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Number/NumberBase')
|
||||
--所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("AvatarUpLevel",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "AvatarUpLevel"
|
||||
self.Category = "数值"
|
||||
self.Description="角色升级数值验证"
|
||||
|
||||
local upLevelStep=3
|
||||
function self:UpLevelCheck(avatarName)
|
||||
yield_return(self:ChangeAvatar(avatarName))
|
||||
--突破等级
|
||||
for promoteLevel=0,4 do
|
||||
local startLevel=1
|
||||
local endLevel=20
|
||||
--根据突破等级设置升级上下限
|
||||
if promoteLevel==0 then
|
||||
startLevel=1
|
||||
endLevel=20
|
||||
elseif promoteLevel==1 then
|
||||
startLevel=20
|
||||
endLevel=40
|
||||
elseif promoteLevel==2 then
|
||||
startLevel=40
|
||||
endLevel=60
|
||||
elseif promoteLevel==3 then
|
||||
startLevel=60
|
||||
endLevel=80
|
||||
elseif promoteLevel==4 then
|
||||
startLevel=80
|
||||
endLevel=90
|
||||
end
|
||||
--突破
|
||||
yield_return(self.base:RunGM("break "..promoteLevel))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
--1~20级
|
||||
for level=startLevel,endLevel,upLevelStep do
|
||||
yield_return(self.base:RunGM("level "..level))
|
||||
yield_return(self.base:WaitIntProperty("level",level))
|
||||
local maxHP = self.base:GetFloatPropertyValue("maxHP")
|
||||
local attackBase = self.base:GetFloatPropertyValue("attackBase")
|
||||
local defenseBase = self.base:GetFloatPropertyValue("defenseBase")
|
||||
local level = self.base:GetIntPropertyValue("level")
|
||||
self.base:CheckAvatarMaxHPByLevel(promoteLevel,level,maxHP)
|
||||
self.base:CheckAvatarAttackByLevel(promoteLevel, level, attackBase)
|
||||
self.base:CheckAvatarDefenseByLevel(promoteLevel, level, defenseBase)
|
||||
yield_return(CS.UnityEngine.WaitForEndOfFrame())
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
self.Setup = {
|
||||
Order = 0.1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="clear all,完成所有新手任务",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:FinishAllNoob())
|
||||
yield_return(self.base:RunGM("Player Level 70"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.PlayerGirlUpCheck = {
|
||||
Order = 0.5,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="女主仅装备新手武器,各等级最大血量,基础攻击成长曲线数值测试",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:UpLevelCheck("PlayerGirl"))
|
||||
end)
|
||||
}
|
||||
|
||||
self.AyakaLevelUpCheck = {
|
||||
Order = 1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="绫华仅装备新手武器,各等级最大血量,基础攻击成长曲线数值测试",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:UpLevelCheck("Ayaka"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.AnboLevelUpCheck = {
|
||||
Order = 2,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="安柏仅装备新手武器,各等级最大血量,基础攻击成长曲线数值测试",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:UpLevelCheck("Anbo"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.BarbaraLevelUpCheck = {
|
||||
Order = 3,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="芭芭拉仅装备新手武器,各等级最大血量,基础攻击成长曲线数值测试",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:UpLevelCheck("Barbara"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.KaeyaLevelUpCheck = {
|
||||
Order = 4,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="凯亚仅装备新手武器,各等级最大血量,基础攻击成长曲线数值测试",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:UpLevelCheck("Kaeya"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.LisaLevelUpCheck = {
|
||||
Order = 5,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="丽莎仅装备新手武器,各等级最大血量,基础攻击成长曲线数值测试",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:UpLevelCheck("Lisa"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.QinLevelUpCheck = {
|
||||
Order = 6,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="琴仅装备新手武器,各等级最大血量,基础攻击成长曲线数值测试",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:UpLevelCheck("Qin"))
|
||||
end)
|
||||
}
|
||||
|
||||
self.DilucLevelUpCheck = {
|
||||
Order = 7,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="迪卢克仅装备新手武器,各等级最大血量,基础攻击成长曲线数值测试",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:UpLevelCheck("Diluc"))
|
||||
end)
|
||||
}
|
||||
|
||||
self.RazorLevelUpCheck = {
|
||||
Order = 8,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="雷泽仅装备新手武器,各等级最大血量,基础攻击成长曲线数值测试",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:UpLevelCheck("Razor"))
|
||||
end)
|
||||
}
|
||||
|
||||
self.VentiLevelUpCheck = {
|
||||
Order = 9,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="温迪仅装备新手武器,各等级最大血量,基础攻击成长曲线数值测试",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:UpLevelCheck("Venti"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.XianglingLevelUpCheck = {
|
||||
Order = 10,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="香菱仅装备新手武器,各等级最大血量,基础攻击成长曲线数值测试",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:UpLevelCheck("Xiangling"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
|
||||
return self
|
@@ -0,0 +1,293 @@
|
||||
--baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Number/NumberBase')
|
||||
--所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("AvatarWeaponTest",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "AvatarWeaponTest"
|
||||
self.Category = "数值"
|
||||
self.Description="武器升级数值验证"
|
||||
|
||||
|
||||
local avatarLevel=1
|
||||
local avatarPromoteLevel = 0
|
||||
local step=10
|
||||
|
||||
function self:CheckWeaponByType(weaponId, promoteLevel, level, type)
|
||||
local weaponData = self.base:GetAvatarWeaponData(type)
|
||||
yield_return(self.base:WaitFrames(5))
|
||||
local checkPassed = self.base:CheckAvatarWeaponByLevel(promoteLevel,level,weaponData,weaponId,type)
|
||||
assert(checkPassed,"武器"..type:EnumToString().."数值验证失败")
|
||||
end
|
||||
|
||||
function self:WeaponCheck(weaponId, promoteLevel, level)
|
||||
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
|
||||
self:CheckWeaponByType(weaponId, promoteLevel, level, CS.MoleMole.Config.FightPropType.FIGHT_PROP_BASE_ATTACK)
|
||||
self:CheckWeaponByType(weaponId, promoteLevel, level, CS.MoleMole.Config.FightPropType.FIGHT_PROP_CRITICAL)
|
||||
|
||||
self:CheckWeaponByType(weaponId, promoteLevel, level, CS.MoleMole.Config.FightPropType.FIGHT_PROP_CRITICAL_HURT)
|
||||
|
||||
self:CheckWeaponByType(weaponId, promoteLevel, level, CS.MoleMole.Config.FightPropType.FIGHT_PROP_CHARGE_EFFICIENCY)
|
||||
|
||||
local avatarAttack = self.base:GetFloatPropertyValue("attackBase")
|
||||
local checkPassed = self.base:CheckAvatarAttackByLevel(avatarPromoteLevel,avatarLevel,avatarAttack)
|
||||
|
||||
assert(checkPassed,"武器装备角色验证数值失败")
|
||||
|
||||
yield_return(CS.UnityEngine.WaitForEndOfFrame())
|
||||
|
||||
end
|
||||
|
||||
local weaponList = {"11101","11201","11301","11302","11401","11402","11403","11404","11501","11502","11503"}
|
||||
|
||||
self.SwordCheck = {
|
||||
Order = 1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="各种剑类武器升级突破数值验证测试(使用绫华装备)",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:RunGM("Player Level 70"))
|
||||
yield_return(self.base:RunGM("break "..avatarPromoteLevel))
|
||||
yield_return(self.base:RunGM("level "..avatarLevel))
|
||||
yield_return(CS.UnityEngine.WaitForEndOfFrame())
|
||||
local gmCmd =""
|
||||
|
||||
|
||||
|
||||
for key,weaponId in ipairs(weaponList) do
|
||||
|
||||
for i=1,20,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,0,i))
|
||||
end
|
||||
|
||||
for i=20,40,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 1"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,1,i))
|
||||
end
|
||||
|
||||
for i=40,60,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 2"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,2,i))
|
||||
end
|
||||
|
||||
for i=60,80,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 3"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,3,i))
|
||||
end
|
||||
|
||||
for i=80,90,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 4"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,4,i))
|
||||
end
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
local weaponList = {"12101","12201","12301","12302","12303","12401","12403","12404"}
|
||||
|
||||
self.ClaymoreCheck = {
|
||||
Order = 1.5,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="大剑类武器升级突破数值验证测试(使用迪卢克装备)",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Diluc"))
|
||||
yield_return(self.base:RunGM("break "..avatarPromoteLevel))
|
||||
yield_return(self.base:RunGM("level "..avatarLevel))
|
||||
yield_return(CS.UnityEngine.WaitForEndOfFrame())
|
||||
local gmCmd =""
|
||||
|
||||
|
||||
for key,weaponId in ipairs(weaponList) do
|
||||
--weaponId = tostring(tonumber(weaponId)+1000)
|
||||
for i=1,20,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,0,i))
|
||||
end
|
||||
|
||||
for i=20,40,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 1"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,1,i))
|
||||
end
|
||||
|
||||
for i=40,60,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 2"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,2,i))
|
||||
end
|
||||
|
||||
for i=60,80,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 3"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,3,i))
|
||||
end
|
||||
|
||||
for i=80,90,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 4"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,4,i))
|
||||
end
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
local weaponList = {"14101","14201","14301","14302","14401","14403","14404","14501"}
|
||||
|
||||
self.CatalystCheck = {
|
||||
Order = 2,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="法器类武器升级突破数值验证测试(使用丽莎装备)",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Lisa"))
|
||||
yield_return(self.base:RunGM("Player Level 70"))
|
||||
yield_return(self.base:RunGM("break "..avatarPromoteLevel))
|
||||
yield_return(self.base:RunGM("level "..avatarLevel))
|
||||
yield_return(CS.UnityEngine.WaitForEndOfFrame())
|
||||
local gmCmd =""
|
||||
|
||||
|
||||
for key,weaponId in ipairs(weaponList) do
|
||||
--weaponId = tostring(tonumber(weaponId)+3000)
|
||||
for i=1,20,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,0,i))
|
||||
end
|
||||
|
||||
for i=20,40,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 1"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,1,i))
|
||||
end
|
||||
|
||||
for i=40,60,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 2"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,2,i))
|
||||
end
|
||||
|
||||
for i=60,80,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 3"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,3,i))
|
||||
end
|
||||
|
||||
for i=80,90,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 4"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,4,i))
|
||||
end
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
local weaponList = {"15101","15201","15301","15302","15401","15501"}
|
||||
|
||||
self.BowCheck = {
|
||||
Order = 4,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="弓类武器升级突破数值验证测试(使用安柏装备)",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:RunGM("break "..avatarPromoteLevel))
|
||||
yield_return(self.base:RunGM("level "..avatarLevel))
|
||||
yield_return(CS.UnityEngine.WaitForEndOfFrame())
|
||||
local gmCmd =""
|
||||
|
||||
|
||||
for key,weaponId in ipairs(weaponList) do
|
||||
--weaponId = tostring(tonumber(weaponId)+4000)
|
||||
for i=1,20,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,0,i))
|
||||
end
|
||||
|
||||
for i=20,40,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 1"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,1,i))
|
||||
end
|
||||
|
||||
for i=40,60,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 2"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,2,i))
|
||||
end
|
||||
|
||||
for i=60,80,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 3"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,3,i))
|
||||
end
|
||||
|
||||
for i=80,90,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 4"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,4,i))
|
||||
end
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
local weaponList = {"13101","13201","13301","13302","13401","13504"}
|
||||
|
||||
self.PoleCheck = {
|
||||
Order = 5,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="枪类武器升级突破数值验证测试(使用香菱装备)",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Xiangling"))
|
||||
yield_return(self.base:RunGM("break "..avatarPromoteLevel))
|
||||
yield_return(self.base:RunGM("level "..avatarLevel))
|
||||
yield_return(CS.UnityEngine.WaitForEndOfFrame())
|
||||
local gmCmd =""
|
||||
|
||||
|
||||
for key,weaponId in ipairs(weaponList) do
|
||||
--weaponId = tostring(tonumber(weaponId)+2000)
|
||||
for i=1,20,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,0,i))
|
||||
end
|
||||
|
||||
for i=20,40,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 1"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,1,i))
|
||||
end
|
||||
|
||||
for i=40,60,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 2"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,2,i))
|
||||
end
|
||||
|
||||
for i=60,80,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 3"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,3,i))
|
||||
end
|
||||
|
||||
for i=80,90,step do
|
||||
gmCmd = "EQUIP ADD "..weaponId.." "..i .. " 4"
|
||||
yield_return(self.base:RunGM(gmCmd))
|
||||
yield_return(self:WeaponCheck(weaponId,4,i))
|
||||
end
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
@@ -0,0 +1,24 @@
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
local UAutoLuaTestCase = class("QuestNumberData", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
|
||||
self.base = TestCaseQuestBaseClass()
|
||||
self.TestFixture = "QuestNumberData"
|
||||
self.Category = "数值报表"
|
||||
self.Description="任务数值报表"
|
||||
self.OrderIndex = 0;
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.QuestNumberCheck = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "生成任务数值报表",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("clear all", false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(5))
|
||||
|
||||
yield_return(self.base:StartCheckQuestNumber(true))
|
||||
end)
|
||||
}
|
||||
|
||||
return self
|
Reference in New Issue
Block a user