mirror of
https://gitlab.com/YuukiPS/GSServer-CBT.git
synced 2026-02-04 12:20:54 +03:00
melon
This commit is contained in:
109
soggy_resources/lua/UAuto/Base/UAutoCommon.lua
Normal file
109
soggy_resources/lua/UAuto/Base/UAutoCommon.lua
Normal file
@@ -0,0 +1,109 @@
|
||||
--测试类型枚举定义
|
||||
|
||||
|
||||
function CreatEnumTable(tbl, index)
|
||||
local enumtbl = {}
|
||||
local enumindex = index or 0
|
||||
for i, v in ipairs(tbl) do
|
||||
enumtbl[v] = enumindex + i
|
||||
end
|
||||
return enumtbl
|
||||
end
|
||||
|
||||
AutoTestObject = CS.UnityEngine.GameObject.Find("AutoTestObject")
|
||||
|
||||
if AutoTestObject ~= nil then
|
||||
driver = CS.UnityEngine.GameObject.Find("AutoTestObject"):GetComponent("AutoTestDriver")
|
||||
end
|
||||
|
||||
if AutoTestObject == nil then
|
||||
driver = CS.UnityEngine.GameObject.Find("GameManager"):GetComponent("AutoTestDriver")
|
||||
end
|
||||
|
||||
coroutineTable = {}
|
||||
|
||||
function UAutoCoroutine(co_func)
|
||||
return function(...)
|
||||
if(co_func~=nil) then
|
||||
local obj = ...
|
||||
local coIndex = #coroutineTable+1
|
||||
coroutineTable[coIndex] = {}
|
||||
driver.luaMonoTestFinished=false
|
||||
coroutineTable[coIndex]["thread"]= coroutine.create(co_func)
|
||||
coroutineTable[coIndex]["finished"] = false
|
||||
|
||||
assert(coroutine.resume(coroutineTable[coIndex]["thread"],obj))
|
||||
--delete immediately dead coroutine
|
||||
if(coroutine.status(coroutineTable[coIndex]["thread"])=="dead") then
|
||||
table.remove(coroutineTable)
|
||||
if (#coroutineTable == 0) then
|
||||
driver.luaMonoTestFinished=true
|
||||
end
|
||||
end
|
||||
else
|
||||
driver.luaMonoTestFinished=true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--协程执行完成callback
|
||||
function UAutoCorotineCallback(...)
|
||||
local testObj = {...}
|
||||
local coCount = #coroutineTable
|
||||
local currentCo = coroutineTable[coCount]["thread"]
|
||||
|
||||
if(currentCo==nil) then
|
||||
return
|
||||
end
|
||||
|
||||
if(coroutine.status(currentCo)~="dead") then
|
||||
assert(coroutine.resume(currentCo,testObj))
|
||||
end
|
||||
if(coroutine.status(currentCo)=="dead") then
|
||||
--delete currentCo
|
||||
table.remove(coroutineTable)
|
||||
if (#coroutineTable == 0) then
|
||||
driver.luaMonoTestFinished=true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
CaseType =
|
||||
{
|
||||
"Test",
|
||||
"MonoTest",
|
||||
"SetUp",
|
||||
"TearDown"
|
||||
}
|
||||
|
||||
CaseType = CreatEnumTable(CaseType)
|
||||
|
||||
RunMode =
|
||||
{
|
||||
"Host",
|
||||
"Client",
|
||||
"Local"
|
||||
}
|
||||
|
||||
RunMode = CreatEnumTable(RunMode)
|
||||
|
||||
IsSync =
|
||||
{
|
||||
"True",
|
||||
"False"
|
||||
}
|
||||
|
||||
IsSync = CreatEnumTable(IsSync)
|
||||
|
||||
--lua test case 基类初始化
|
||||
TestCaseBaseClass = CS.MoleMole.UAuto.TestCaseBase
|
||||
TestCaseNetworkBaseClass = CS.MoleMole.UAuto.TestCaseNetworkBase
|
||||
TestCaseNumberBaseClass = CS.MoleMole.UAuto.TestCaseNumberBase
|
||||
TestCaseElementBaseClass = CS.MoleMole.UAuto.TestCaseElementBase
|
||||
TestCaseQuestBaseClass = CS.MoleMole.UAuto.TestCaseQuestBase
|
||||
TestCaseSceneBase = CS.MoleMole.UAuto.TestCaseSceneBase
|
||||
TestCaseCombatBase = CS.MoleMole.UAuto.TestCaseCombatBase
|
||||
--TestDriver = CS.MoleMole.UAuto.AutoTestDriver
|
||||
uAutoLuaTestCases = {}
|
||||
20
soggy_resources/lua/UAuto/Base/UAutoCoroutine.lua
Normal file
20
soggy_resources/lua/UAuto/Base/UAutoCoroutine.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
local util = require ('Base/util')
|
||||
|
||||
local cs_coroutine_runner = nil
|
||||
if AutoTestObject ~= nil then
|
||||
cs_coroutine_runner = CS.UnityEngine.GameObject.Find("AutoTestObject"):GetComponent("AutoTestDriver")
|
||||
end
|
||||
|
||||
if AutoTestObject == nil then
|
||||
cs_coroutine_runner = CS.UnityEngine.GameObject.Find("GameManager"):GetComponent("AutoTestDriver")
|
||||
end
|
||||
|
||||
local function async_yield_return(to_yield, cb)
|
||||
print(to_yield)
|
||||
cs_coroutine_runner:YieldAndCallback(to_yield, cb)
|
||||
end
|
||||
|
||||
|
||||
return {
|
||||
yield_return = util.async_to_sync(async_yield_return)
|
||||
}
|
||||
335
soggy_resources/lua/UAuto/Base/UAutoLuaTestBase.lua
Normal file
335
soggy_resources/lua/UAuto/Base/UAutoLuaTestBase.lua
Normal file
@@ -0,0 +1,335 @@
|
||||
require('Base/Class')
|
||||
|
||||
yield_return = require('UAuto/Base/UAutoCoroutine').yield_return
|
||||
local util = require ('Base/util')
|
||||
|
||||
|
||||
local UAutoLuaTestBase = class("UAutoLuaTestBase",nil)
|
||||
|
||||
--Global Atrributes for test suite
|
||||
--local Category = "All"
|
||||
--local Order = "1000"
|
||||
--local Description = "Base Description"
|
||||
|
||||
UAutoLuaTestBase.base = TestCaseBaseClass()
|
||||
|
||||
setmetatable(UAutoLuaTestBase,{ __index = UAutoLuaTestBase.base })
|
||||
|
||||
sceneData = sceneData or require('Base/SceneData')
|
||||
--[[
|
||||
@desc: 对话
|
||||
time:2018-07-16 14:55:55
|
||||
--@index: 选择第x项,从0开始
|
||||
@return: nil
|
||||
]]
|
||||
function UAutoLuaTestBase:Talk(index)
|
||||
self._dialogPanel = self.InLevelMainPage:GetComponent("MonoInLevelMainPage"):GetPrivateField("_dialogPanel")
|
||||
self._listItems = self._dialogPanel:GetPrivateField("_listItems")
|
||||
print(self._listItems)
|
||||
self._listItems[index].actionButton.onClick:Invoke()
|
||||
end
|
||||
|
||||
local WaitTalkTimeout = 10
|
||||
function UAutoLuaTestBase:WaitTalk(index)
|
||||
local byIndex=true
|
||||
local _type = type(index)
|
||||
if _type == type("string") then
|
||||
byIndex=false
|
||||
end
|
||||
|
||||
yield_return(self.base:SelectDialog(index))
|
||||
|
||||
end
|
||||
|
||||
--[[
|
||||
@desc: 捡取
|
||||
time:2018-07-16 14:55:55
|
||||
--@index: 选择第x项,从0开始
|
||||
@return: nil
|
||||
]]
|
||||
function UAutoLuaTestBase:Pick(index)
|
||||
yield_return(self.base:Pick(index))
|
||||
end
|
||||
|
||||
function UAutoLuaTestBase:ChangeAvatar(name, isLeader)
|
||||
isLeader = isLeader or false
|
||||
-- if name=="PlayerGirl" then
|
||||
-- name="PlayerBoy"
|
||||
-- end
|
||||
|
||||
local perfabName = name
|
||||
if name=="Anbo" then
|
||||
perfabName="Bow_Ambor"
|
||||
name="Ambor"
|
||||
end
|
||||
|
||||
|
||||
|
||||
yield_return(self.base:RefreshTeam(perfabName,isLeader))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self.base:RefreshTeam(perfabName,isLeader))
|
||||
|
||||
yield_return(self.base:WaitFoundGameObject("InLevelMainPage",function(result) self.InLevelMainPage = result end))
|
||||
|
||||
self.avatar = self.InLevelMainPage:FindGameObjectsInChildren(name)
|
||||
assert(self.avatar.Length>0,"切换角色"..name.."失败")
|
||||
--print(self.avatar)
|
||||
local rectTransform = self.avatar[0]:GetComponent("RectTransform")
|
||||
--print(rectTransform.rect.height)
|
||||
if (rectTransform.rect.height>0) then
|
||||
self.avatar[0]:GetComponent("MoleMole.MonoTeamBtn").actionButton.onClick:Invoke()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
end
|
||||
|
||||
local entityManager = singletonManager:GetSingletonInstance("MoleMole.EntityManager")
|
||||
|
||||
local localAvatar = entityManager:GetLocalAvatarEntity()
|
||||
|
||||
--print(localAvatar.gameObject.activeInHierarchy)
|
||||
while (localAvatar.gameObject.activeInHierarchy~=true)
|
||||
do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
end
|
||||
end
|
||||
--[[
|
||||
@desc: 等待CutScene或TalkDialog结束
|
||||
time:2018-07-16 14:57:12
|
||||
--@talkToEnd: 是否进行点击
|
||||
@return: nil
|
||||
]]
|
||||
function UAutoLuaTestBase:WaitCutScene(talkToEnd,timeout,skipIfNotExist)
|
||||
skipIfNotExist = skipIfNotExist or false
|
||||
self.talkDialog =nil
|
||||
self.InLevelCutScenePage=nil
|
||||
self.TutorialDialog = nil
|
||||
timeout = timeout or 60
|
||||
while self.talkDialog==nil and self.InLevelCutScenePage==nil and self.TutorialDialog==nil do
|
||||
self.talkDialog = CS.UnityEngine.GameObject.Find("TalkDialog")
|
||||
self.InLevelCutScenePage = CS.UnityEngine.GameObject.Find("InLevelCutScenePage")
|
||||
self.TutorialDialog = CS.UnityEngine.GameObject.Find("TutorialDialog")
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
timeout = timeout - 1
|
||||
|
||||
if timeout<0 then
|
||||
if skipIfNotExist == true then
|
||||
return
|
||||
else
|
||||
assert(1==0,"等待CutScene出现超时.")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if(self.InLevelCutScenePage~=nil) then
|
||||
self.monoInLevelCutScenePage = self.InLevelCutScenePage:GetComponent("MonoInLevelCutScenePage")
|
||||
print(self.monoInLevelCutScenePage)
|
||||
assert(self.monoInLevelCutScenePage~=nil, "monoInLevelCutScenePage is null");
|
||||
end
|
||||
|
||||
if(self.talkDialog~=nil) then
|
||||
print(typeof(CS.UnityEngine.UI.Button))
|
||||
self.talkButton = self.talkDialog:GetComponentInChildren(typeof(CS.UnityEngine.UI.Button))
|
||||
self.selectButtons = self.talkDialog:FindGameObjectsInChildren("0")
|
||||
end
|
||||
|
||||
|
||||
if(talkToEnd) then
|
||||
print("Start talk to end")
|
||||
timeout = 120
|
||||
if(self.InLevelCutScenePage~=nil or self.talkDialog~=nil or self.TutorialDialog~=nil) then
|
||||
local hasCutScene=true
|
||||
local hasTalkDialog=true
|
||||
local hasTutorialDialog=true
|
||||
|
||||
while (hasTalkDialog or hasCutScene)
|
||||
do
|
||||
self.talkDialog = CS.UnityEngine.GameObject.Find("TalkDialog")
|
||||
self.InLevelCutScenePage = CS.UnityEngine.GameObject.Find("InLevelCutScenePage")
|
||||
|
||||
if(self.InLevelCutScenePage~=nil and self.InLevelCutScenePage.activeInHierarchy) then
|
||||
self.monoInLevelCutScenePage = self.InLevelCutScenePage:GetComponent("MonoInLevelCutScenePage")
|
||||
assert(self.monoInLevelCutScenePage~=nil, "monoInLevelCutScenePage is null");
|
||||
end
|
||||
|
||||
if(self.monoInLevelCutScenePage==nil or self.monoInLevelCutScenePage.isActiveAndEnabled==false) then
|
||||
hasCutScene=false
|
||||
end
|
||||
|
||||
if(self.talkDialog==nil or self.talkDialog.activeInHierarchy==false) then
|
||||
hasTalkDialog=false
|
||||
end
|
||||
|
||||
if(self.TutorialDialog==nil or self.TutorialDialog.activeInHierarchy==false) then
|
||||
hasTutorialDialog=false
|
||||
end
|
||||
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
|
||||
if(self.monoInLevelCutScenePage~=nil) then
|
||||
print("Click CutScene.")
|
||||
self.monoInLevelCutScenePage.onClick:Invoke()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
end
|
||||
yield_return(CS.UnityEngine.WaitForEndOfFrame())
|
||||
if(self.talkDialog~=nil and self.talkDialog.activeInHierarchy) then
|
||||
self.talkButton = self.talkDialog:GetComponentInChildren(typeof(CS.UnityEngine.UI.Button))
|
||||
self.selectButtons = self.talkDialog:FindGameObjectsInChildren("0")
|
||||
print("Click Talk Button.")
|
||||
self.talkButton.onClick:Invoke()
|
||||
if(self.selectButtons.Length>0) then
|
||||
print("Select Button 0.")
|
||||
local button = self.selectButtons[0]:GetComponent("UnityEngine.UI.Button")
|
||||
if button~=nil then
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
button.onClick:Invoke()
|
||||
end
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
end
|
||||
end
|
||||
|
||||
-- if(hasTutorialDialog) then
|
||||
-- print("click Screen for Tutorial")
|
||||
-- yield_return(self.base:ClickScreen())
|
||||
-- end
|
||||
timeout = timeout-1
|
||||
assert(timeout>0,"WaitCutScene timeout")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
@desc: 打开小地图
|
||||
author:{wyl}
|
||||
time:2018-07-25 15:47:11
|
||||
@return:
|
||||
]]
|
||||
function UAutoLuaTestBase:OpenMap()
|
||||
yield_return(self.base:WaitFoundGameObject("InLevelMainPage",function(result) self.InLevelMainPage = result end,false))
|
||||
self.MonoMiniMap = self.base.InLevelMainPage:FindComponentInChildren("MoleMole.MonoMiniMap")
|
||||
self._grpMap = self.MonoMiniMap:GetPrivateField("_grpMap")
|
||||
self._grpMap.gameObject:GetComponent("Button").onClick:Invoke()
|
||||
yield_return(self.base:WaitFoundGameObject("InLevelMapPage",function(result) self.InLevelMapPage = result end,false))
|
||||
assert(self.InLevelMapPage~=nil,"InLevelMapPage is nil")
|
||||
self.MonoInLevelMapPage = self.InLevelMapPage:GetComponent("MonoInLevelMapPage")
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
end
|
||||
|
||||
function UAutoLuaTestBase:CloseMap()
|
||||
yield_return(self.base:WaitFoundGameObject("InLevelMapPage",function(result) self.InLevelMapPage = result end,false))
|
||||
assert(self.InLevelMapPage~=nil,"InLevelMapPage is nil")
|
||||
self.MonoInLevelMapPage = self.InLevelMapPage:GetComponent("MonoInLevelMapPage")
|
||||
assert(self.MonoInLevelMapPage~=nil,"self.MonoInLevelMapPage is nil")
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
self.MonoInLevelMapPage.closeBtn.onClick:Invoke()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
|
||||
end
|
||||
|
||||
function UAutoLuaTestBase:WaitFoundEntity(name, timeout, range)
|
||||
local name = name or ""
|
||||
local timeout = timeout or 60
|
||||
local range = range or 100
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self.base:WaitFoundNearByEntityByName(name,function(result) self.foundEntity = result end,timeout,range))
|
||||
end
|
||||
|
||||
|
||||
function UAutoLuaTestBase:WaitFoundEntityById(Id, timeout, range)
|
||||
local Id = Id or 0
|
||||
local timeout = timeout or 60
|
||||
local range = range or 100
|
||||
yield_return(self.base:WaitFoundNearByEntityById(Id,function(result) self.foundEntity = result end,timeout,range))
|
||||
end
|
||||
|
||||
|
||||
function UAutoLuaTestBase:WaitMoveToEntityByName(name,timeout,range)
|
||||
local name = name or ""
|
||||
local timeout = timeout or 60
|
||||
local range = range or 100
|
||||
yield_return(self.base:WaitFoundNearByEntityByName(name,function(result) self.moveTarget = result end,timeout,range))
|
||||
yield_return(self.base:MoveToEntity(self.moveTarget,timeout,1))
|
||||
end
|
||||
|
||||
function UAutoLuaTestBase:ReturnToHome()
|
||||
self.monoInLevelMainPage = self.base.InLevelMainPage:GetComponent("MonoInLevelMainPage")
|
||||
self.monoInLevelMainPage.gmButton.onClick:Invoke()
|
||||
yield_return (self.base:WaitFoundGameObject("InLevelDebugMenuDialog",function(result) self.InLevelDebugMenuDialog = result end))
|
||||
self.MonoInLevelDebugMenuDialog = self.InLevelDebugMenuDialog:GetComponent("MonoInLevelDebugMenuDialog")
|
||||
self.MonoInLevelDebugMenuDialog.returnButton.onClick:Invoke()
|
||||
yield_return (self.base:WaitLevelLoaded("Home"))
|
||||
end
|
||||
|
||||
function UAutoLuaTestBase:EnterMaster(name)
|
||||
name = name or "Daily"
|
||||
yield_return(self.base:EnterBigWorldFromGame(name,false))
|
||||
yield_return (self.base:WaitLevelLoaded("Level"))
|
||||
end
|
||||
|
||||
function UAutoLuaTestBase:Reconnect(name)
|
||||
name = name or "Daily"
|
||||
yield_return(self:ReturnToHome())
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(5))
|
||||
yield_return(self:EnterMaster(name))
|
||||
end
|
||||
|
||||
|
||||
function UAutoLuaTestBase:FinishAllNoob()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self.base:RunGM("clear all",true,true))
|
||||
yield_return(self.base:RunGM("Quest Finish Father 351 352 353"))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(5))
|
||||
|
||||
local mapPage = CS.UnityEngine.GameObject.Find("InLevelMapPage")
|
||||
if mapPage~=nil and mapPage.activeInHierarchy then
|
||||
yield_return(self:CloseMap())
|
||||
end
|
||||
|
||||
print("frame index: GM")
|
||||
yield_return(self.base:WaitFrames(31))
|
||||
yield_return(self.base:MouseClick( "Canvas/Pages/InLevelMainPage/GrpMainPage/GrpMainBtn/GrpMainToggle/BtnGm/Icon"))
|
||||
|
||||
|
||||
print("frame index: Return")
|
||||
yield_return(self.base:WaitFrames(37))
|
||||
yield_return(self.base:MouseClick( "Canvas/Dialogs/InLevelDebugMenuDialog/Return/Text"))
|
||||
|
||||
print("frame index: EnterBigWorldFromGame")
|
||||
yield_return(self.base:EnterBigWorldFromGame(self.base.driver.ServerName, false))
|
||||
|
||||
print("frame index: Jump")
|
||||
yield_return(self.base:WaitFrames(30))
|
||||
yield_return(self.base:Jump())
|
||||
|
||||
end
|
||||
|
||||
function UAutoLuaTestBase:ReEnterBigWorld()
|
||||
print("ReEnterBigWorld")
|
||||
local gameManager = CS.UnityEngine.GameObject.Find("GameManager")
|
||||
local gameManagerComponent = gameManager:GetComponent("GameManager")
|
||||
if gameManagerComponent.isOnlineMode then
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
singletonManager:GetSingletonInstance("MoleMole.NetworkManager"):RequestLeaveScene();
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self.base:EnterBigWorldFromGame(""))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
else
|
||||
singletonManager:GetSingletonInstance("MoleMole.PlayerModule"):GoBackHome();
|
||||
yield_return(self.base:EnterStreaming())
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function UAutoLuaTestBase:GetIntPart(x)
|
||||
if x <= 0 then
|
||||
return math.ceil(x);
|
||||
end
|
||||
|
||||
if math.ceil(x) == x then
|
||||
x = math.ceil(x);
|
||||
else
|
||||
x = math.ceil(x) - 1;
|
||||
end
|
||||
return x;
|
||||
end
|
||||
|
||||
return UAutoLuaTestBase
|
||||
@@ -0,0 +1,88 @@
|
||||
--baseClass提供基础接口
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
--所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("UAutoLuaTestCaseExample",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
|
||||
--测试集名称(必选)
|
||||
UAutoLuaTestCase.TestFixture = "UAutoLuaTestCaseExample"
|
||||
--测试集所属分类(可选)
|
||||
--UAutoLuaTestCase.Category = "All"
|
||||
--测试集执行顺序(可选)
|
||||
UAutoLuaTestCase.Order = 99
|
||||
--测试集描述(可选)
|
||||
--UAutoLuaTestCase.Description = "Base Description"
|
||||
|
||||
|
||||
|
||||
|
||||
--测试case
|
||||
UAutoLuaTestCase.MonoTest1 = {
|
||||
--当前case执行顺序
|
||||
Order=2,
|
||||
--当前case分类
|
||||
Category="UI",
|
||||
--测试case类型:MonoTest 游戏中测试,以协程方式执行,可以通过yield_return释放控制权,不会卡住游戏
|
||||
Type = CaseType.MonoTest,
|
||||
--case描述
|
||||
Description = "I am MonoTest1.",
|
||||
--具体case的执行逻辑,MonoTest类型需用UAutoCoroutine开头
|
||||
Action = UAutoCoroutine(
|
||||
function()
|
||||
print("corotine start")
|
||||
local t = os.time()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(10))
|
||||
print("wait 10 sec: "..os.time() - t)
|
||||
t = os.time()
|
||||
yield_return(CS.UnityEngine.WaitForEndOfFrame())
|
||||
print("WaitForEndOfFrame: "..os.time() - t)
|
||||
-- 调用嵌套的coroutine,用UAutoCoroutine包装,嵌套协程函数需在最后另加上()括号
|
||||
UAutoCoroutine(UAutoLuaTestCase.internalCoroutine)()
|
||||
t = os.time()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(30))
|
||||
print("wait another 30 sec: "..os.time() - t )
|
||||
print("corotine end")
|
||||
end
|
||||
),
|
||||
|
||||
}
|
||||
|
||||
--嵌套协程函数测试
|
||||
function UAutoLuaTestCase.internalCoroutine()
|
||||
print "internalCoroutine"
|
||||
local t = os.time()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(10))
|
||||
print ("internalCoroutine after 10 sec:"..os.time() - t)
|
||||
end
|
||||
|
||||
--普通类型测试
|
||||
UAutoLuaTestCase.Test1 = {
|
||||
Order=1,
|
||||
Category="UI",
|
||||
Type = CaseType.Test,
|
||||
Description = "I am Test1.",
|
||||
Action = function()
|
||||
print("UAutoLuaTestCase1.Test")
|
||||
end
|
||||
}
|
||||
|
||||
--环境准备
|
||||
UAutoLuaTestCase.SetUp = {
|
||||
Type = CaseType.SetUp,
|
||||
Action = function()
|
||||
assert(1==2,"error test")
|
||||
print("UAutoLuaTestCase1.SetUp")
|
||||
end
|
||||
}
|
||||
|
||||
--环境清理
|
||||
UAutoLuaTestCase.TearDown = {
|
||||
Type = CaseType.TearDown,
|
||||
Action = function()
|
||||
print("UAutoLuaTestCase1.TearDown")
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
--一定要返回当前类对象
|
||||
return UAutoLuaTestCase
|
||||
62
soggy_resources/lua/UAuto/TestCases/avatar/Avatar100Dead.lua
Normal file
62
soggy_resources/lua/UAuto/TestCases/avatar/Avatar100Dead.lua
Normal file
@@ -0,0 +1,62 @@
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
local UAutoLuaTestCase = class("Avatar100Dead",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "Avatar100Dead"
|
||||
self.Category = "死亡复活恢复"
|
||||
self.Order = 2000
|
||||
self.Description = "角色死亡"
|
||||
local CliffStartPosition = CS.UnityEngine.Vector3(1514.75 , 281.3354 , -1585.041)
|
||||
local CliffTargetPosition = CS.UnityEngine.Vector3(1512.83 , 280.8578 , -1589.611)
|
||||
|
||||
UAutoLuaTestCase.SetUp = {
|
||||
Order = 0.1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:SetUpVariables())
|
||||
end)
|
||||
}
|
||||
|
||||
UAutoLuaTestCase.GotoCliff = {
|
||||
Order = 1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "移动到悬崖",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:TelePort(CliffStartPosition))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
UAutoLuaTestCase.JumpFromCliff = {
|
||||
Order = 2,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "一直往前跑,跳崖并检查死亡",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.direction = CliffTargetPosition - CliffStartPosition
|
||||
local timeout = 30
|
||||
while true do
|
||||
yield_return(self.base:StartMove(self.direction))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
timeout = timeout-1
|
||||
assert(timeout>0,"Wait dead timeout")
|
||||
if(self.base.avatar.isAlive==false) then
|
||||
break
|
||||
end
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
UAutoLuaTestCase.StopMove = {
|
||||
Order = 3,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "停止往前跑",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StopMove(self.direction))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return self
|
||||
19
soggy_resources/lua/UAuto/TestCases/avatar/Test.lua
Normal file
19
soggy_resources/lua/UAuto/TestCases/avatar/Test.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
local UAutoLuaTestCase = class("AutoTest_test",baseClass)
|
||||
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "AutoTest_test"
|
||||
self.Category = "默认分类" --自行修改分类
|
||||
self.Description = "AutoTest_test" --自行修改用例描述
|
||||
|
||||
UAutoLuaTestCase.Step_1 = {
|
||||
Order = 1, --执行顺序
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "Step_1", --步骤描述
|
||||
Action = UAutoCoroutine(function()
|
||||
--yield_return(self.base:CollectPoint())
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
end)
|
||||
}
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,71 @@
|
||||
local baseClass = require("UAuto/TestCases/Avatar/Skill/AvatarSkillBase")
|
||||
local UAutoLuaTestCase = class("AmborSkill", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "AmborSkill"
|
||||
self.Category = "角色技能"
|
||||
self.Description = "安柏角色技能"
|
||||
|
||||
self.OrderIndex = 0;
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-娃娃",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(1, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(1))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(4))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻(瞄准射击)",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
|
||||
yield_return(self.base:Skill(0))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,12 @@
|
||||
local baseClass = require("UAuto/Base/UAutoLuaTestBase")
|
||||
local UAutoLuaTestCase = class("AvatarSkillBase", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.base = TestCaseBaseClass()
|
||||
self.TestFixture = "AvatarSkillBase"
|
||||
|
||||
self.safePos = "1955.741 196.5956 -1298.704"
|
||||
self.doSkillCount = 15
|
||||
self.doSkillWait = 0.3
|
||||
self.caseWait = 5
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,82 @@
|
||||
local baseClass = require("UAuto/TestCases/Avatar/Skill/AvatarSkillBase")
|
||||
local UAutoLuaTestCase = class("AyakaSkill", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "AyakaSkill"
|
||||
self.Category = "角色技能"
|
||||
self.Description = "绫华角色技能"
|
||||
|
||||
self.OrderIndex = 0;
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-冰圈",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(1))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能2-水激流",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(2, false))
|
||||
yield_return(self.base:MoveByAngle(180))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(2))
|
||||
yield_return(self.base:MoveByAngle(180, true))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(4))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,67 @@
|
||||
local baseClass = require("UAuto/TestCases/Avatar/Skill/AvatarSkillBase")
|
||||
local UAutoLuaTestCase = class("BarbaraSkill", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "BarbaraSkill"
|
||||
self.Category = "角色技能"
|
||||
self.Description = "芭芭拉角色技能"
|
||||
|
||||
self.OrderIndex = 0;
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-小水圈",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(1))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(4))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,67 @@
|
||||
local baseClass = require("UAuto/TestCases/Avatar/Skill/AvatarSkillBase")
|
||||
local UAutoLuaTestCase = class("DilucSkill", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "DilucSkill"
|
||||
self.Category = "角色技能"
|
||||
self.Description = "迪卢克角色技能"
|
||||
|
||||
self.OrderIndex = 0;
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self:ChangeAvatar("Diluc"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-猛地一砍",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(1))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(4))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,67 @@
|
||||
local baseClass = require("UAuto/TestCases/Avatar/Skill/AvatarSkillBase")
|
||||
local UAutoLuaTestCase = class("KaeyaSkill", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "KaeyaSkill"
|
||||
self.Category = "角色技能"
|
||||
self.Description = "凯亚角色技能"
|
||||
|
||||
self.OrderIndex = 0;
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self:ChangeAvatar("Kaeya"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-一团冰气",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(1))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(4))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,67 @@
|
||||
local baseClass = require("UAuto/TestCases/Avatar/Skill/AvatarSkillBase")
|
||||
local UAutoLuaTestCase = class("LisaSkill", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "LisaSkill"
|
||||
self.Category = "角色技能"
|
||||
self.Description = "丽莎角色技能"
|
||||
|
||||
self.OrderIndex = 0;
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self:ChangeAvatar("Lisa"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-电球",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(1))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(4))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,80 @@
|
||||
local baseClass = require("UAuto/TestCases/Avatar/Skill/AvatarSkillBase")
|
||||
local UAutoLuaTestCase = class("PlayerBoySkill", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "PlayerBoySkill"
|
||||
self.Category = "角色技能"
|
||||
self.Description = "男主角色技能"
|
||||
|
||||
self.OrderIndex = 0;
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self:ChangeAvatar("PlayerBoy"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:RunGM("skill depot 504"))
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill10 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-风球",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(1))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill11 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强小技能1-风球",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(1, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(1))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(4))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,80 @@
|
||||
local baseClass = require("UAuto/TestCases/Avatar/Skill/AvatarSkillBase")
|
||||
local UAutoLuaTestCase = class("PlayerGirlSkill", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "PlayerGirlSkill"
|
||||
self.Category = "角色技能"
|
||||
self.Description = "女主角色技能"
|
||||
|
||||
self.OrderIndex = 0;
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self:ChangeAvatar("PlayerGirl"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:RunGM("skill depot 504"))
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill10 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-风球",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(1))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill11 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强小技能1-风球",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(1, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(1))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(4))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,80 @@
|
||||
local baseClass = require("UAuto/TestCases/Avatar/Skill/AvatarSkillBase")
|
||||
local UAutoLuaTestCase = class("QinSkill", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "QinSkill"
|
||||
self.Category = "角色技能"
|
||||
self.Description = "琴角色技能"
|
||||
|
||||
self.OrderIndex = 0;
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self:ChangeAvatar("Qin"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill10 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-风球",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(1))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill11 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强小技能1-风球",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(1, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(1))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(4))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,74 @@
|
||||
local baseClass = require("UAuto/TestCases/Avatar/Skill/AvatarSkillBase")
|
||||
local UAutoLuaTestCase = class("RazorSkill", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "RazorSkill"
|
||||
self.Category = "角色技能"
|
||||
self.Description = "雷泽角色技能"
|
||||
|
||||
self.OrderIndex = 0;
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self:ChangeAvatar("Razor"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-狼爪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(1))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技(释放后接普攻)",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(4))
|
||||
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,67 @@
|
||||
local baseClass = require("UAuto/TestCases/Avatar/Skill/AvatarSkillBase")
|
||||
local UAutoLuaTestCase = class("VentiSkill", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "VentiSkill"
|
||||
self.Category = "角色技能"
|
||||
self.Description = "温蒂角色技能"
|
||||
|
||||
self.OrderIndex = 0;
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self:ChangeAvatar("Venti"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻(瞄准射击)",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-一团风",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(1))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(4))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,67 @@
|
||||
local baseClass = require("UAuto/TestCases/Avatar/Skill/AvatarSkillBase")
|
||||
local UAutoLuaTestCase = class("XianglingSkill", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "XianglingSkill"
|
||||
self.Category = "角色技能"
|
||||
self.Description = "香菱角色技能"
|
||||
|
||||
self.OrderIndex = 0;
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self:ChangeAvatar("Xiangling"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-熊猫",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(1))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:Skill(4))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
93
soggy_resources/lua/UAuto/TestCases/combat/CombatBase.lua
Normal file
93
soggy_resources/lua/UAuto/TestCases/combat/CombatBase.lua
Normal file
@@ -0,0 +1,93 @@
|
||||
local baseClass = require("UAuto/Base/UAutoLuaTestBase")
|
||||
local UAutoLuaTestCase = class("CombatBase", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.base = TestCaseCombatBase()
|
||||
self.TestFixture = "CombatBase"
|
||||
|
||||
self.safePos = "1955.741 196.5956 -1298.704"
|
||||
self.center = CS.UnityEngine.Vector3(1955.741, 196.5956, -1298.704)
|
||||
self.doSkillCount = 10
|
||||
self.doSkillWait = 0.2
|
||||
self.caseWait = 5
|
||||
self.entityManager = singletonManager:GetSingletonInstance("MoleMole.EntityManager")
|
||||
self.monsterIdx=0
|
||||
|
||||
self.MonsterPeers= {
|
||||
{21010101,"Hili_None_01"},
|
||||
{21020101,"Brute_None_Shield"},
|
||||
{21020201,"Brute_None_Axe"},
|
||||
{20010101,"Slime_Grass_02"},
|
||||
{20010201,"Slime_Grass_03"},
|
||||
{20010301,"Slime_Wind_02"},
|
||||
{20010401,"Slime_Wind_03"},
|
||||
{20010501,"Slime_Electric_02"},
|
||||
{20010601,"Slime_Electric_03"},
|
||||
{20010701,"Slime_Electric_03_Positive"},
|
||||
{20010801,"Slime_Ice_02"},
|
||||
{20010901,"Slime_Ice_03"},
|
||||
{20011001,"Slime_Water_02"},
|
||||
{20011101,"Slime_Water_03"},
|
||||
{21010201,"Hili_None"},
|
||||
{21010301,"Hili_None"},
|
||||
{21010401,"Hili_None"},
|
||||
{21010501,"Hili_Fire"},
|
||||
{21010601,"Hili_Fire"},
|
||||
{21010701,"Hili_Fire"},
|
||||
{21010901,"Hili_Ice"},
|
||||
{21011001,"Hili_Electric"},
|
||||
{20011201,"Slime_Fire"},
|
||||
{20011301,"Slime_Fire"},
|
||||
{20011401,"Slime_Rock"},
|
||||
{20011501,"Slime_Rock"},
|
||||
{22010101,"Abyss_Fire"},
|
||||
{22010201,"Abyss_Ice"},
|
||||
{22010301,"Abyss_Water"},
|
||||
{21030101,"Shaman_Water"},
|
||||
{21030201,"Shaman_Grass"},
|
||||
{21030301,"Shaman_Wind"},
|
||||
{23040101,"Defender_None"},
|
||||
}
|
||||
|
||||
|
||||
self.MonsterPeersInHit= {
|
||||
{21010101,"Hili_None_01"},
|
||||
{21020101,"Brute_None_Shield"},
|
||||
{20010301,"Slime_Wind_02"},
|
||||
{21010501,"Hili_Fire"},
|
||||
{22010101,"Abyss_Fire"},
|
||||
{21030101,"Shaman_Water"},
|
||||
}
|
||||
|
||||
self.Avatars={"Anbo","Ayaka","Barbara","Diluc","Kaeya","Lisa","PlayerBoy","PlayerGirl","Qin","Razor","Venti","Xiangling"}
|
||||
--girl Male Lady Boy
|
||||
self.BeHitAvatars={"Anbo","Diluc","Lisa","Razor"}
|
||||
|
||||
--self.Avatars={"Anbo"}
|
||||
|
||||
|
||||
|
||||
function self:CreateMonsters()
|
||||
self.base:MonsterAI(false)
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
self.base:CreateMonsterByAngle(self.MonsterId, (10 * idx % 360))
|
||||
end
|
||||
end
|
||||
|
||||
function self:SetAvatarPos(pos)
|
||||
local entityManager = singletonManager:GetSingletonInstance("MoleMole.EntityManager")
|
||||
local localAvatar = entityManager:GetLocalAvatarEntity()
|
||||
localAvatar:SetPosition(pos)
|
||||
end
|
||||
|
||||
|
||||
function self:MonsterRefocus()
|
||||
self:SetAvatarPos(self.center)
|
||||
yield_return(self:WaitFoundEntityById(self.MonsterId))
|
||||
yield_return(self.base:MoveToPosition(self.foundEntity.transform.position,30,4))
|
||||
yield_return(self.base:RotateCamera(self.foundEntity.transform.position))
|
||||
self.base:SetCheckMonster(self.foundEntity.runtimeID)
|
||||
end
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,99 @@
|
||||
local baseClass = require("UAuto/TestCases/Combat/CombatBase")
|
||||
local UAutoLuaTestCase = class("AmborSkillHitMonster", baseClass)
|
||||
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "AmborSkillHitMonster"
|
||||
self.Category = "战斗"
|
||||
self.Description = "安柏技能打各种怪"
|
||||
self.MonsterId = 21010101
|
||||
self.MonsterKeyWord = "Hili_None_01"
|
||||
self.OrderIndex = 0;
|
||||
self.AvatarName = "Anbo"
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
|
||||
|
||||
self.Init = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:InitEvtHook()
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:ChangeAvatar(self.AvatarName))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
self.base:MonsterGod(true)
|
||||
self:CreateMonsters()
|
||||
end)
|
||||
|
||||
}
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻打怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "娃娃打怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(1, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(0.1))
|
||||
yield_return(self.base:SkillUp(1))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技打怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.End = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "结束",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:StopEvtHook())
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,120 @@
|
||||
local baseClass = require("UAuto/TestCases/Combat/CombatBase")
|
||||
local UAutoLuaTestCase = class("AyakaSkillHitMonster", baseClass)
|
||||
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "AyakaSkillHitMonster"
|
||||
self.Category = "战斗"
|
||||
self.Description = "绫华技能打各种怪"
|
||||
self.MonsterId = 21010101
|
||||
self.MonsterKeyWord = "Hili_None_01"
|
||||
self.OrderIndex = 0;
|
||||
self.AvatarName = "Ayaka"
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
|
||||
|
||||
|
||||
|
||||
self.Init = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:InitEvtHook()
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:ChangeAvatar(self.AvatarName))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
self.base:MonsterGod(true)
|
||||
self:CreateMonsters()
|
||||
end)
|
||||
|
||||
}
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻打怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻打怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(self.base:WaitChecking())
|
||||
yield_return(self.base:SkillUp(0))
|
||||
end
|
||||
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-冰圈",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技打怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.End = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "结束",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:StopEvtHook())
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,115 @@
|
||||
local baseClass = require("UAuto/TestCases/Combat/CombatBase")
|
||||
local UAutoLuaTestCase = class("BarbaraSkillHitMonster", baseClass)
|
||||
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "BarbaraSkillHitMonster"
|
||||
self.Category = "战斗"
|
||||
self.Description = "芭芭拉技能打各种怪"
|
||||
self.OrderIndex = 0;
|
||||
self.AvatarName = "Barbara"
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.Init = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:InitEvtHook()
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:ChangeAvatar(self.AvatarName))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
self.base:MonsterGod(true)
|
||||
self:CreateMonsters()
|
||||
end)
|
||||
|
||||
}
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻打怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻打怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(self.base:WaitChecking())
|
||||
yield_return(self.base:SkillUp(0))
|
||||
end
|
||||
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技打怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.End = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "结束",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:StopEvtHook())
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,84 @@
|
||||
local baseClass = require("UAuto/TestCases/Combat/CombatBase")
|
||||
local UAutoLuaTestCase = class("CombatAvatar", baseClass)
|
||||
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "CombatAvatar"
|
||||
self.Category = "战斗"
|
||||
self.Description = "各个角色被各种怪击退,击飞"
|
||||
|
||||
|
||||
|
||||
self.OrderIndex = 0;
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.Init = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:FinishAllNoob())
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(CS.UnityEngine.WaitForEndOfFrame())
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
self.base:InitEvtHook()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
|
||||
self.AvatarsBeHit = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "角色受击",
|
||||
Action = UAutoCoroutine(function()
|
||||
--每个怪都可以击退,击飞角色
|
||||
for _,monsterPeer in ipairs(self.MonsterPeers) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("Level 1"))
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
print("create monster id: "..tostring(self.MonsterId).." monsterName: "..self.MonsterKeyWord)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
self.base:SetCheckMonster(self.foundEntity.runtimeID)
|
||||
--每个角色都可以被击退、击飞
|
||||
for _,avatarName in ipairs(self.BeHitAvatars) do
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self:ChangeAvatar(avatarName))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.localAvatar = singletonManager:GetSingletonInstance("MoleMole.EntityManager"):GetLocalAvatarEntity()
|
||||
--目标锁定玩家
|
||||
self.base:MonsterSetTarget(self.foundEntity,self.localAvatar)
|
||||
--走到玩家身边
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.localAvatar.transform.position))
|
||||
|
||||
yield_return(CS.UnityEngine.WaitForEndOfFrame())
|
||||
--打玩家,验证击飞高度
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:WaitChecking())
|
||||
--yield_return(self.base:WaitCheckHitLevel(CS.MoleMole.Config.HitLevel.Air))
|
||||
--打玩家,验证击退距离
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.localAvatar.transform.position))
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:WaitChecking())
|
||||
--yield_return(self.base:WaitCheckHitLevel(CS.MoleMole.Config.HitLevel.Heavy))
|
||||
end
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(5))
|
||||
end
|
||||
end)
|
||||
}
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.End = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "角色受击",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StopEvtHook())
|
||||
end)
|
||||
}
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,121 @@
|
||||
local baseClass = require("UAuto/TestCases/Combat/CombatBase")
|
||||
local UAutoLuaTestCase = class("DilucSkillHitMonster", baseClass)
|
||||
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "DilucSkillHitMonster"
|
||||
self.Category = "战斗"
|
||||
self.Description = "迪卢克技能打各种怪"
|
||||
self.OrderIndex = 0;
|
||||
self.AvatarName = "Diluc"
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.Init = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:InitEvtHook()
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:ChangeAvatar(self.AvatarName))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
self.base:MonsterGod(true)
|
||||
self:CreateMonsters()
|
||||
end)
|
||||
|
||||
}
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻打怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻打怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self.base:WaitChecking())
|
||||
yield_return(self.base:SkillUp(0))
|
||||
end
|
||||
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1打怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(1))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技打怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.End = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "结束",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.caseWait))
|
||||
yield_return(self.base:StopEvtHook())
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,104 @@
|
||||
local baseClass = require("UAuto/TestCases/Combat/CombatBase")
|
||||
local UAutoLuaTestCase = class("KaeyaSkillHitMonster", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "KaeyaSkillHitMonster"
|
||||
self.Category = "战斗"
|
||||
self.Description = "凯亚角色技能打怪"
|
||||
|
||||
self.OrderIndex = 0;
|
||||
|
||||
self.AvatarName = "Kaeya"
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.Init = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:InitEvtHook()
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:ChangeAvatar(self.AvatarName))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
self.base:MonsterGod(true)
|
||||
self:CreateMonsters()
|
||||
end)
|
||||
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-一团冰气",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,104 @@
|
||||
local baseClass = require("UAuto/TestCases/Combat/CombatBase")
|
||||
local UAutoLuaTestCase = class("LisaSkillHitMonster", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "LisaSkillHitMonster"
|
||||
self.Category = "战斗"
|
||||
self.Description = "丽莎角色技能打怪"
|
||||
self.AvatarName = "Lisa"
|
||||
self.OrderIndex = 0;
|
||||
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.Init = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:InitEvtHook()
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:ChangeAvatar(self.AvatarName))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
self.base:MonsterGod(true)
|
||||
self:CreateMonsters()
|
||||
end)
|
||||
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-电球",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,108 @@
|
||||
local baseClass = require("UAuto/TestCases/Combat/CombatBase")
|
||||
local UAutoLuaTestCase = class("PlayerBoySkillHitMonster", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "PlayerBoySkillHitMonster"
|
||||
self.Category = "战斗"
|
||||
self.Description = "男主角色技能打怪"
|
||||
self.AvatarName = "PlayerBoy"
|
||||
self.OrderIndex = 0;
|
||||
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.Init = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:InitEvtHook()
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:ChangeAvatar(self.AvatarName))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("skill depot 504"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
self.base:MonsterGod(true)
|
||||
self:CreateMonsters()
|
||||
end)
|
||||
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill11 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强小技能1-风球",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(1, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(1))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,108 @@
|
||||
local baseClass = require("UAuto/TestCases/Combat/CombatBase")
|
||||
local UAutoLuaTestCase = class("PlayerGirlSkillHitMonster", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "PlayerGirlSkillHitMonster"
|
||||
self.Category = "战斗"
|
||||
self.Description = "女主角色技能打怪"
|
||||
self.AvatarName = "PlayerGirl"
|
||||
self.OrderIndex = 0;
|
||||
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.Init = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:InitEvtHook()
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:ChangeAvatar(self.AvatarName))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("skill depot 504"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
self.base:MonsterGod(true)
|
||||
self:CreateMonsters()
|
||||
end)
|
||||
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill11 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强小技能1-风球",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(1, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(1))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,106 @@
|
||||
local baseClass = require("UAuto/TestCases/Combat/CombatBase")
|
||||
local UAutoLuaTestCase = class("QinSkillHitMonster", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "QinSkillHitMonster"
|
||||
self.Category = "战斗"
|
||||
self.Description = "琴角色技能打怪"
|
||||
self.AvatarName = "Qin"
|
||||
self.OrderIndex = 0;
|
||||
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.Init = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:InitEvtHook()
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:ChangeAvatar(self.AvatarName))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
self.base:MonsterGod(true)
|
||||
self:CreateMonsters()
|
||||
end)
|
||||
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill11 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强小技能1-风球",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(1, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(1))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,111 @@
|
||||
local baseClass = require("UAuto/TestCases/Combat/CombatBase")
|
||||
local UAutoLuaTestCase = class("RazorSkillHitMonster", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "RazorSkillHitMonster"
|
||||
self.Category = "战斗"
|
||||
self.Description = "雷泽角色技能打怪"
|
||||
self.AvatarName = "Razor"
|
||||
self.OrderIndex = 0;
|
||||
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.Init = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:InitEvtHook()
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:ChangeAvatar(self.AvatarName))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
self.base:MonsterGod(true)
|
||||
self:CreateMonsters()
|
||||
end)
|
||||
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill11 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:SkillUp(1))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技接普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:WaitChecking())
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,105 @@
|
||||
local baseClass = require("UAuto/TestCases/Combat/CombatBase")
|
||||
local UAutoLuaTestCase = class("VentiSkillHitMonster", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "VentiSkillHitMonster"
|
||||
self.Category = "战斗"
|
||||
self.Description = "温迪角色技能打怪"
|
||||
self.AvatarName = "Venti"
|
||||
self.OrderIndex = 0;
|
||||
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.Init = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:InitEvtHook()
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:ChangeAvatar(self.AvatarName))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
self.base:MonsterGod(true)
|
||||
self:CreateMonsters()
|
||||
end)
|
||||
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1-一团风",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技接普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,105 @@
|
||||
local baseClass = require("UAuto/TestCases/Combat/CombatBase")
|
||||
local UAutoLuaTestCase = class("XianglingSkillHitMonster", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "XianglingSkillHitMonster"
|
||||
self.Category = "战斗"
|
||||
self.Description = "香菱角色技能打怪"
|
||||
self.AvatarName = "Xiangling"
|
||||
self.OrderIndex = 0;
|
||||
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.Init = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:InitEvtHook()
|
||||
yield_return(self.base:RunGM("goto "..self.safePos, true, true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:ChangeAvatar(self.AvatarName))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
self.base:MonsterGod(true)
|
||||
self:CreateMonsters()
|
||||
end)
|
||||
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill00 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
local attackCount = self.doSkillCount
|
||||
while attackCount > 0 do
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(self.doSkillWait))
|
||||
yield_return(self.base:Skill(0))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill01 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "加强普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(0, false))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:SkillUp(0))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "小技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.DoSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "充能技接普攻",
|
||||
Action = UAutoCoroutine(function()
|
||||
for idx,monsterPeer in ipairs(self.MonsterPeersInHit) do
|
||||
self.MonsterId = monsterPeer[1]
|
||||
self.MonsterKeyWord = monsterPeer[2]
|
||||
yield_return(self:MonsterRefocus())
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:WaitChecking())
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
143
soggy_resources/lua/UAuto/TestCases/element/ElementBase.lua
Normal file
143
soggy_resources/lua/UAuto/TestCases/element/ElementBase.lua
Normal file
@@ -0,0 +1,143 @@
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
local UAutoLuaTestCase = class("ElementBase", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "ElementBase"
|
||||
self.base = TestCaseElementBaseClass()
|
||||
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
self.Range = 3
|
||||
|
||||
self.WaterPos = "2735.608 194.2695 -1718.194"
|
||||
self.WaterPosVec = CS.UnityEngine.Vector3(2735.608, 194.2695, -1718.194)
|
||||
|
||||
self.WaterPos1 = "2731.309 194.2681 -1716.102"
|
||||
self.WaterPosVec1 = CS.UnityEngine.Vector3(2731.309, 194.2681, -1716.102)
|
||||
|
||||
self.GrassPos = "1955.741 196.5956 -1298.704"
|
||||
self.GrassPosVec = CS.UnityEngine.Vector3(1955.741, 196.5956, -1298.704)
|
||||
|
||||
-- self.sandPos = "2755.103 194.8858 -5811.606"
|
||||
-- self.sandPosVec = CS.UnityEngine.Vector3(2755.103, 194.8858, -5811.606)
|
||||
|
||||
|
||||
self.MonsterInfoTitle = {"element", "id", "keyword", "fatrange"}
|
||||
self.MonsterArray = {}
|
||||
table.insert(self.MonsterArray, {"Water", 20011101, "Slime_Water_03", 3})
|
||||
table.insert(self.MonsterArray, {"Water", 20011001, "Slime_Water_02", 1})
|
||||
-- table.insert(self.MonsterArray, {"Water", 22010301, "Abyss_Water_01", 3})
|
||||
-- table.insert(self.MonsterArray, {"Water", 21030101, "Shaman_Water_01", 1})
|
||||
table.insert(self.MonsterArray, {"Ice", 20010901, "Slime_Ice_03", 3})
|
||||
-- table.insert(self.MonsterArray, {"Ice", 20010801, "Slime_Ice_02", 1})
|
||||
-- table.insert(self.MonsterArray, {"Ice", 22010201, "Abyss_Ice_01", 3})
|
||||
table.insert(self.MonsterArray, {"Fire", 20011301, "Slime_Fire_03", 3})
|
||||
table.insert(self.MonsterArray, {"Fire", 20011201, "Slime_Fire_02", 1})
|
||||
-- table.insert(self.MonsterArray, {"Fire", 22010101, "Abyss_Fire_01", 3})
|
||||
table.insert(self.MonsterArray, {"Electric", 20010601, "Slime_Electric_03", 3})
|
||||
table.insert(self.MonsterArray, {"Electric", 20010701, "Slime_Electric_03_Positive", 3})
|
||||
table.insert(self.MonsterArray, {"Electric", 20010501, "Slime_Electric_02", 1})
|
||||
table.insert(self.MonsterArray, {"Grass", 20010101, "Slime_Grass_02", 1})
|
||||
table.insert(self.MonsterArray, {"Grass", 20010201, "Slime_Grass_03", 3})
|
||||
-- table.insert(self.MonsterArray, {"Grass", 21030201, "Shaman_Grass_01", 1})
|
||||
table.insert(self.MonsterArray, {"Rock", 20011501, "Slime_Rock_03", 3})
|
||||
-- table.insert(self.MonsterArray, {"Rock", 20011401, "Slime_Rock_02", 1})
|
||||
|
||||
|
||||
self.GadgetInfoTitle = {"element", "type", "id", "campid", "keyword", "owner", "otherinfo"}
|
||||
self.GadgetArray = {}
|
||||
-- table.insert(self.GadgetArray, {"Grass", "AvatarWeapon", 50010007, 0, "Equip_Sword_Wooden", "Ayaka", 10011})
|
||||
table.insert(self.GadgetArray, {"Grass", "MonsterWeapon", 50004002, 0, "MonEquip_Shield_01", 21010301, ""})
|
||||
table.insert(self.GadgetArray, {"Grass", "MonsterWeapon", 50004012, 0, "MonEquip_Shield_02", 21020101, ""})
|
||||
table.insert(self.GadgetArray, {"Grass", "Item", 70220003, 5001, "Item_BrambleWall01", "", ""})
|
||||
table.insert(self.GadgetArray, {"Grass", "Item", 70220005, 5001, "Item_Bombbarrel01", "", ""})
|
||||
|
||||
|
||||
function self:GetArray(title, array)
|
||||
local rsArray = {}
|
||||
|
||||
for i, content in pairs(array) do
|
||||
local tmpDic = {}
|
||||
for j = 1, #title do
|
||||
-- title里有的内容,array里必须有
|
||||
tmpDic[title[j]] = content[j]
|
||||
end
|
||||
table.insert(rsArray, tmpDic)
|
||||
end
|
||||
|
||||
return rsArray
|
||||
end
|
||||
|
||||
function self:GetMatchArray(t, k, v)
|
||||
local rsArray = {}
|
||||
|
||||
for i, item in pairs(t) do
|
||||
if(item[k] == v) then
|
||||
table.insert(rsArray, item)
|
||||
end
|
||||
end
|
||||
|
||||
return rsArray
|
||||
end
|
||||
|
||||
|
||||
function self:GetMonsterArrayByElement(element)
|
||||
local rsArray = self:GetArray(self.MonsterInfoTitle, self.MonsterArray)
|
||||
return self:GetMatchArray(rsArray, "element", element)
|
||||
end
|
||||
|
||||
function self:GetOneMonsterByElement(element)
|
||||
return self:GetMonsterArrayByElement(element)[1]
|
||||
end
|
||||
|
||||
function self:GetGadgetArrayByElement(element)
|
||||
local rsArray = self:GetArray(self.GadgetInfoTitle, self.GadgetArray)
|
||||
return self:GetMatchArray(rsArray, "element", element)
|
||||
end
|
||||
|
||||
function self:GetAvatarWeaponArrayByElement(element)
|
||||
local gadgetArray = self:GetGadgetArrayByElement(element)
|
||||
return self:GetMatchArray(gadgetArray, "type", "AvatarWeapon")
|
||||
end
|
||||
|
||||
function self:GetOneAvatarWeaponByElement(element)
|
||||
return self:GetAvatarWeaponArrayByElement(element)[1]
|
||||
end
|
||||
|
||||
function self:GetMonsterWeaponArrayByElement(element)
|
||||
local gadgetArray = self:GetGadgetArrayByElement(element)
|
||||
return self:GetMatchArray(gadgetArray, "type", "MonsterWeapon")
|
||||
end
|
||||
|
||||
function self:GetOneMonsterWeaponByElement(element)
|
||||
return self:GetMonsterWeaponArrayByElement(element)[1]
|
||||
end
|
||||
|
||||
function self:GetItemArrayByElement(element)
|
||||
local gadgetArray = self:GetGadgetArrayByElement(element)
|
||||
return self:GetMatchArray(gadgetArray, "type", "Item")
|
||||
end
|
||||
|
||||
function self:GetOneItemByElement(element)
|
||||
return self:GetItemArrayByElement(element)[1]
|
||||
end
|
||||
|
||||
|
||||
local windEntityNum = 0
|
||||
function self:GetWindEntityCount()
|
||||
windEntityNum = self.base:GetEntityCount("Eff_WindField_FireGrass")
|
||||
end
|
||||
|
||||
function self:CheckWindEntityCount(signal)
|
||||
local tmp = self.base:GetEntityCount("Eff_WindField_FireGrass")
|
||||
if(signal == "-") then
|
||||
assert(tmp < windEntityNum, "风场未移除!")
|
||||
windEntityNum = tmp
|
||||
end
|
||||
if(signal == "+") then
|
||||
assert(tmp > windEntityNum, "风场未出现!")
|
||||
windEntityNum = tmp
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,47 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("ElectricComponent", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "ElectricComponent"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素成分-电"
|
||||
|
||||
self.Element = "Electric"
|
||||
self.MonsterArray = self:GetMonsterArrayByElement(self.Element)
|
||||
self.GadgetArray = self:GetGadgetArrayByElement(self.Element)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查怪物电元素成分",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
for i, monster in pairs(self.MonsterArray) do
|
||||
self.base:CreateMonster(monster["id"])
|
||||
yield_return(self:WaitFoundEntity(monster["keyword"]))
|
||||
yield_return(self.base:CheckElementContain(self.Element, self.foundEntity))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckAvatar = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查武将电元素成分:雷泽释放充能技",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Razor"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:CheckElementContain(self.Element))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,61 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("ElectricFireReaction", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "ElectricFireReaction"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素反应-电<-火"
|
||||
|
||||
self.Element = "Electric"
|
||||
self.CatalystElement = "Fire"
|
||||
|
||||
self.ElementMonster = self:GetOneMonsterByElement(self.Element)
|
||||
self.CatalystMonster = self:GetOneMonsterByElement(self.CatalystElement)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "电元素怪物与火反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity, self.FindTimeOut, self.ElementMonster["fatrange"]))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:CheckElectricReaction(self.CatalystElement, self.foundEntity))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckAvatar = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "电元素武将与火反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Razor"))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:Skill(4))
|
||||
self.base:MonsterAI(true)
|
||||
|
||||
-- self.base:CreateMonster(self.iceTypicalMonster[1])
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.CatalystMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.CatalystMonster["keyword"]))
|
||||
|
||||
yield_return(self.base:CheckElectricReaction(self.CatalystElement))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,46 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("ElectricReaction", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "ElectricReaction"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素反应-电"
|
||||
|
||||
self.Element = "Electric"
|
||||
|
||||
self.NegativeMonster = self:GetMonsterArrayByElement(self.Element)[1]
|
||||
self.PositiveMonster = self:GetMonsterArrayByElement(self.Element)[2]
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckElectricShock = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "电元素怪物对武将的电击效果",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("LEVEL 1"))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.NegativeMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.NegativeMonster["keyword"]))
|
||||
yield_return(self.base:CheckAnimateOn("ElectricShock"))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckPosNegElectric = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "正负电元素怪物通电效果",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.PositiveMonster["id"]).." 1 1"))
|
||||
yield_return(self.base:CheckElectricReaction("ElectricPositive", self.foundEntity))
|
||||
yield_return(self.base:CheckElectricReaction("DischargeOff", self.foundEntity))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,34 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("FireComponent", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "FireComponent"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素成分-火"
|
||||
|
||||
self.Element = "Fire"
|
||||
self.MonsterArray = self:GetMonsterArrayByElement(self.Element)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查怪物火元素成分",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
for i, monster in pairs(self.MonsterArray) do
|
||||
self.base:CreateMonster(monster["id"])
|
||||
yield_return(self:WaitFoundEntity(monster["keyword"]))
|
||||
self.base:MonsterDoSkill(self.foundEntity, 0)
|
||||
yield_return(self.base:CheckElementContain(self.Element, self.foundEntity))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,39 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("FireElectricReaction", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "FireElectricReaction"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素反应-火<-电"
|
||||
|
||||
self.Element = "Fire"
|
||||
self.CatalystElement = "Electric"
|
||||
|
||||
self.ElementMonster = self:GetOneMonsterByElement(self.Element)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "火元素怪物与电反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
self.base:MonsterDoSkill(self.foundEntity, 0)
|
||||
|
||||
yield_return(self:ChangeAvatar("Razor"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity, self.FindTimeOut, self.ElementMonster["fatrange"]))
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:CheckFireReaction(self.CatalystElement, self.foundEntity))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,40 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("FireReaction", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "FireReaction"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素反应-火"
|
||||
|
||||
self.Element = "Fire"
|
||||
|
||||
self.ElementMonster = self:GetOneMonsterByElement(self.Element)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckFireElementAdd = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "火攻补充火元素",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.WaterPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:CheckElementRemove(self.Element, self.foundEntity))
|
||||
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity, self.FindTimeOut, self.ElementMonster["fatrange"]))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:CheckElementContain(self.Element, self.foundEntity))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,50 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("FireWaterReaction", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "FireWaterReaction"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素反应-火<-水"
|
||||
|
||||
self.Element = "Fire"
|
||||
self.CatalystElement = "Water"
|
||||
|
||||
self.ElementMonster = self:GetOneMonsterByElement(self.Element)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "火元素怪物与水反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
-- yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
-- yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
-- yield_return(self.base:RunGM("WUDI ON"))
|
||||
-- self.base:MonsterAI(true)
|
||||
|
||||
-- yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
-- yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
-- yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
|
||||
-- yield_return(self:ChangeAvatar("Barbara"))
|
||||
-- yield_return(self.base:MoveToEntity(self.foundEntity, self.FindTimeOut, self.ElementMonster["fatrange"]))
|
||||
-- yield_return(self.base:Skill(1))
|
||||
-- yield_return(self.base:CheckElementRemove(self.Element, self.foundEntity))
|
||||
-- yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
|
||||
yield_return(self.base:RunGM("goto "..self.WaterPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
|
||||
yield_return(self.base:CheckElementRemove(self.Element, self.foundEntity))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,62 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("GrassComponent", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "GrassComponent"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素成分-草"
|
||||
|
||||
self.Element = "Grass"
|
||||
self.MonsterArray = self:GetMonsterArrayByElement(self.Element)
|
||||
self.GadgetArray = self:GetGadgetArrayByElement(self.Element)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查怪物草元素成分",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
for i, monster in pairs(self.MonsterArray) do
|
||||
self.base:CreateMonster(monster["id"])
|
||||
yield_return(self:WaitFoundEntity(monster["keyword"]))
|
||||
yield_return(self.base:CheckElementContain(self.Element, self.foundEntity))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckGadget = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查物件(含武器等)草元素成分",
|
||||
Action = UAutoCoroutine(function()
|
||||
for i, gadget in pairs(self.GadgetArray) do
|
||||
self.base:CreateGadget(gadget["id"], gadget["campid"], self.GrassPosVec)
|
||||
yield_return(self:WaitFoundEntity(gadget["keyword"]))
|
||||
yield_return(self.base:CheckElementContain(self.Element, self.foundEntity))
|
||||
yield_return(self.base:RemoveEntity(self.foundEntity))
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckAvatar = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查武将草元素成分",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.entityManager = singletonManager:GetSingletonInstance("MoleMole.EntityManager")
|
||||
self.localAvatar = self.entityManager:GetLocalAvatarEntity()
|
||||
self.base:CreateGadget(42001015, 4001, self.localAvatar.transform.position)
|
||||
yield_return(self.base:CheckElementContain(self.Element))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,131 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("GrassFireReaction", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "GrassFireReaction"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素反应-草<-火"
|
||||
|
||||
self.Element = "Grass"
|
||||
self.CatalystElement = "Fire"
|
||||
|
||||
self.ElementMonster = self:GetOneMonsterByElement(self.Element)
|
||||
self.CatalystMonster = self:GetOneMonsterByElement(self.CatalystElement)
|
||||
self.ElementAvatarWeapon = self:GetOneAvatarWeaponByElement(self.Element)
|
||||
self.ElementMonsterWeapon = self:GetOneMonsterWeaponByElement(self.Element)
|
||||
self.ElementItem = self:GetOneItemByElement(self.Element)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "草元素怪物与火反应:着火,草元素耗尽",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
self:GetWindEntityCount()
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity, self.FindTimeOut, self.ElementMonster["fatrange"]))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:CheckGrassReaction(self.CatalystElement, self.foundEntity))
|
||||
yield_return(self.base:CheckElementRemove(self.Element, self.foundEntity))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckEnv = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "草元素环境与火反应:着火,起风,风灭,不再点燃",
|
||||
Action = UAutoCoroutine(function()
|
||||
self:CheckWindEntityCount("+")
|
||||
yield_return(self.base:CheckGrassEnvReaction(self.CatalystElement))
|
||||
-- yield_return(self.base:CheckGrassEnvReaction("AntiFire"))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(10))
|
||||
self:CheckWindEntityCount("-")
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckMonsterWeapon = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "草元素怪物武器与火反应:着火,移除",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonsterWeapon["owner"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonsterWeapon["keyword"]))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:CheckGrassReaction(self.CatalystElement, self.foundEntity))
|
||||
yield_return(self.base:CheckEntityRemove(self.foundEntity.runtimeID))
|
||||
end)
|
||||
}
|
||||
|
||||
-- self.OrderIndex = self.OrderIndex + 1;
|
||||
-- self.CheckAvatarWeapon = {
|
||||
-- Order = self.OrderIndex,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description = "草元素武将武器与火反应:着火",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- yield_return(self:ChangeAvatar(self.ElementAvatarWeapon["owner"]))
|
||||
-- yield_return(self.base:RunGM("EQUIP ADD "..tostring(self.ElementAvatarWeapon["otherinfo"])))
|
||||
-- yield_return(self:WaitFoundEntity(self.ElementAvatarWeapon["keyword"]))
|
||||
-- yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
-- yield_return(self.base:RunGM("WUDI ON"))
|
||||
-- self.base:MonsterAI(true)
|
||||
|
||||
-- yield_return(self.base:RunGM("MONSTER "..tostring(self.CatalystMonster["id"]).." 1 1"))
|
||||
-- yield_return(self.base:CheckGrassReaction(self.CatalystElement, self.foundEntity))
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckGadget = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "草元素物件与火反应:着火,移除",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("GADGET "..tostring(self.ElementItem["id"]).." 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementItem["keyword"]))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity, self.FindTimeOut, self.Range))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:CheckGrassReaction(self.CatalystElement, self.foundEntity))
|
||||
yield_return(self.base:CheckEntityRemove(self.foundEntity.runtimeID))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckAvatar = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "草元素武将与火反应:着火,草元素销毁",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(true)
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.CatalystMonster["id"]).." 1 1"))
|
||||
self.entityManager = singletonManager:GetSingletonInstance("MoleMole.EntityManager")
|
||||
self.localAvatar = self.entityManager:GetLocalAvatarEntity()
|
||||
self.base:CreateGadget(42001015, 4001, self.localAvatar.transform.position)
|
||||
self.base:CreateGadget(42001015, 4001, self.localAvatar.transform.position)
|
||||
self.base:CreateGadget(42001015, 4001, self.localAvatar.transform.position)
|
||||
self.base:CreateGadget(42001015, 4001, self.localAvatar.transform.position)
|
||||
yield_return(self.base:CheckGrassReaction(self.CatalystElement))
|
||||
yield_return(self.base:CheckElementRemove(self.Element))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end)
|
||||
}
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,79 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("IceComponent", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "IceComponent"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素成分-冰"
|
||||
|
||||
self.Element = "Ice"
|
||||
self.SubElement = "Frozen"
|
||||
self.MonsterArray = self:GetMonsterArrayByElement(self.Element)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查怪物冰元素成分",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
for i, monster in pairs(self.MonsterArray) do
|
||||
self.base:CreateMonster(monster["id"])
|
||||
yield_return(self:WaitFoundEntity(monster["keyword"]))
|
||||
yield_return(self.base:CheckElementContain(self.SubElement, self.foundEntity))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckAvatar = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查武将冰元素成分:被冰史莱姆攻击",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:MonsterAI(true)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.MonsterArray[1]["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.MonsterArray[1]["keyword"]))
|
||||
yield_return(self.base:CheckElementContain(self.Element))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckEnv = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查怪物落在水面结冰",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.WaterPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.MonsterArray[1]["id"]).." 1 1"))
|
||||
yield_return(self.base:CheckWaterEnvReaction(self.Element))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckEnv2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查武将冰技能打在水面结冰",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("goto "..self.WaterPos,true,true))
|
||||
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:CheckWaterEnvReaction(self.Element))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,66 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("IceFireReaction", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "IceFireReaction"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素反应-冰<-火"
|
||||
|
||||
self.Element = "Ice"
|
||||
self.SubElement = "Frozen"
|
||||
self.CatalystElement = "Fire"
|
||||
|
||||
self.ElementMonster = self:GetOneMonsterByElement(self.Element)
|
||||
self.CatalystMonster = self:GetOneMonsterByElement(self.CatalystElement)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "冰元素怪物与火反应:蒸气、冰属性销毁",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
|
||||
yield_return(self:ChangeAvatar("Diluc"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity, self.FindTimeOut, self.ElementMonster["fatrange"]))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:CheckIceReaction(self.CatalystElement, self.foundEntity))
|
||||
-- yield_return(self.base:CheckElementRemove(self.SubElement, self.foundEntity))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckEnv = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "冰元素水面与火反应:蒸气、冰面消失",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.WaterPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:CheckWaterEnvReaction("Steam"))
|
||||
yield_return(self.base:CheckWaterEnvReactionRemove(self.Element))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,33 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("RockComponent", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "RockComponent"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素成分-岩"
|
||||
|
||||
self.Element = "Rock"
|
||||
self.MonsterArray = self:GetMonsterArrayByElement(self.Element)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查怪物岩元素成分",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
for i, monster in pairs(self.MonsterArray) do
|
||||
self.base:CreateMonster(monster["id"])
|
||||
yield_return(self:WaitFoundEntity(monster["keyword"]))
|
||||
yield_return(self.base:CheckElementContain(self.Element, self.foundEntity))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,76 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("WaterComponent", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "WaterComponent"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素成分-水"
|
||||
|
||||
self.Element = "Water"
|
||||
self.MonsterArray = self:GetMonsterArrayByElement(self.Element)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查怪物水元素成分",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:FinishAllNoob())
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
for i, monster in pairs(self.MonsterArray) do
|
||||
self.base:CreateMonster(monster["id"])
|
||||
yield_return(self:WaitFoundEntity(monster["keyword"]))
|
||||
yield_return(self.base:CheckElementContain(self.Element, self.foundEntity))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
-- self.OrderIndex = self.OrderIndex + 1;
|
||||
-- self.CheckAvatar1 = {
|
||||
-- Order = self.OrderIndex,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description = "检查武将水元素成分:绫华释放技能2",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- yield_return(self:ChangeAvatar("Ayaka"))
|
||||
-- yield_return(self.base:Skill(2))
|
||||
-- yield_return(self.base:CheckElementContain(self.Element))
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckAvatar2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查武将水元素成分:被水史莱姆攻击",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(true)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.MonsterArray[1]["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.MonsterArray[1]["keyword"]))
|
||||
yield_return(self.base:CheckElementContain(self.Element))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckEnv2Avatar = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查武将靠近水",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:RunGM("goto "..self.WaterPos,true,true))
|
||||
yield_return(self.base:MoveToPosition(self.WaterPosVec1))
|
||||
yield_return(self.base:CheckElementContain(self.Element))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,72 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("WaterElectricReaction", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "WaterElectricReaction"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素反应-水<-电"
|
||||
|
||||
self.Element = "Water"
|
||||
self.CatalystElement = "Electric"
|
||||
|
||||
self.ElementMonster = self:GetOneMonsterByElement(self.Element)
|
||||
self.CatalystMonster = self:GetOneMonsterByElement(self.CatalystElement)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckEnv = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素环境与电反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.WaterPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
|
||||
yield_return(self:ChangeAvatar("Razor"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:CheckWaterEnvReaction(self.CatalystElement))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckAvatar = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素武将与电反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.WaterPos,true,true))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(true)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.CatalystMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.CatalystMonster["keyword"]))
|
||||
|
||||
-- yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
-- yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
yield_return(self.base:CheckWaterReaction(self.CatalystElement))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素怪物与电反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
yield_return(self:ChangeAvatar("Razor"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity, self.FindTimeOut, self.ElementMonster["fatrange"]))
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:CheckWaterReaction(self.CatalystElement, self.foundEntity))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,73 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("WaterFireReaction", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "WaterFireReaction"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素反应-水<-火"
|
||||
|
||||
self.Element = "Water"
|
||||
self.CatalystElement = "Fire"
|
||||
|
||||
self.ElementMonster = self:GetOneMonsterByElement(self.Element)
|
||||
self.CatalystMonster = self:GetOneMonsterByElement(self.CatalystElement)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素怪物与火反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity, self.FindTimeOut, self.ElementMonster["fatrange"]))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:CheckWaterReaction(self.CatalystElement, self.foundEntity))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckAvatar = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素武将与火反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(true)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.CatalystMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.CatalystMonster["keyword"]))
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
|
||||
yield_return(self.base:CheckWaterReaction(self.CatalystElement))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckEnv = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素环境与火反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.WaterPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:CheckWaterEnvReaction("Steam"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,66 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("WaterIceReaction", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "WaterIceReaction"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素反应-水<-冰"
|
||||
|
||||
self.Element = "Water"
|
||||
self.CatalystElement = "Ice"
|
||||
|
||||
self.ElementMonster = self:GetOneMonsterByElement(self.Element)
|
||||
self.CatalystMonster = self:GetOneMonsterByElement(self.CatalystElement)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素怪物与冰反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity, self.FindTimeOut, self.ElementMonster["fatrange"]))
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:CheckWaterReaction(self.CatalystElement, self.foundEntity))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckAvatar = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素武将与冰反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.WaterPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(true)
|
||||
|
||||
yield_return(self.base:MoveToPosition(self.WaterPosVec1))
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.CatalystMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.CatalystMonster["keyword"]))
|
||||
yield_return(self.base:CheckWaterReaction(self.CatalystElement))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckEnv = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素环境与冰反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:CheckWaterEnvReaction(self.CatalystElement))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
101
soggy_resources/lua/UAuto/TestCases/item/AllTreasurebox.lua
Normal file
101
soggy_resources/lua/UAuto/TestCases/item/AllTreasurebox.lua
Normal file
@@ -0,0 +1,101 @@
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
|
||||
local UAutoLuaTestCase = class("AllTreasurebox",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
UAutoLuaTestCase.TestFixture = "AllTreasurebox"
|
||||
UAutoLuaTestCase.Category = "交互机关"
|
||||
self.Description="遍历所有01,02,03类型宝箱"
|
||||
self.Order=705
|
||||
function self:CheckTreasureDisappear()
|
||||
local timeout=60
|
||||
while self.Treasurebox:IsDestroied() == false do
|
||||
timeout=timeout-1
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
assert(timeout>0,"宝箱没有在60s内消失")
|
||||
end
|
||||
end
|
||||
|
||||
function self:PickItem()
|
||||
yield_return(self.base:WaitFoundAllNearbyEntities(function(result) self.items = result end,30))
|
||||
assert(self.items.Count>0,tostring(self.pos) .. " 宝箱没有掉落物")
|
||||
-- for k,v in pairs(self.items) do
|
||||
-- yield_return(self.base:MoveToPosition(v.transform.position,10))
|
||||
-- self:Pick(0)
|
||||
-- end
|
||||
end
|
||||
|
||||
UAutoLuaTestCase.SetUp = {
|
||||
Order = 0.1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("clear all",true,true))
|
||||
yield_return(self.base:SetUpVariables())
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
self.sceneData = sceneData:LoadScene(3,true)
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
|
||||
self.OpenTreasurebox = {
|
||||
Order = 1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="遍历宝箱",
|
||||
Action = UAutoCoroutine(function()
|
||||
print(self.sceneData.GetSuiteGadgets)
|
||||
self.Gadgets = self.sceneData:GetSuiteGadgets()
|
||||
for k,v in pairs(self.Gadgets) do
|
||||
if v.gadget_id==70210001 then
|
||||
self.searchName = 'SceneObj_Item_Treasurebox01'
|
||||
elseif v.gadget_id==70210002 then
|
||||
self.searchName = 'SceneObj_Item_Treasurebox02'
|
||||
elseif v.gadget_id==70210003 then
|
||||
self.searchName = 'SceneObj_Item_Treasurebox03'
|
||||
end
|
||||
|
||||
--普通宝箱
|
||||
if v.gadget_id==70210001 or v.gadget_id==70210002 or v.gadget_id==70210003 then
|
||||
local teleportCmd = "goto " .. v.pos.x+1.5 .. " " .. (v.pos.y+10) .. " " .. (v.pos.z+1.5)
|
||||
self.pos = CS.UnityEngine.Vector3(v.pos.x,v.pos.y,v.pos.z)
|
||||
yield_return(self.base:RunGM(teleportCmd,true,true))
|
||||
yield_return(self.base:WaitFoundGameObject("InLevelMainPage", function(result) self.InLevelMainPage=result end))
|
||||
yield_return(self.base:WaitLevelLoaded("Level"))
|
||||
|
||||
yield_return(self.base:WaitFoundNearByEntityByName(self.searchName,function(result) self.Treasurebox = result end))
|
||||
assert(self.Treasurebox~=nil,self.searchName.." 宝箱没找到 "..tostring(self.pos))
|
||||
|
||||
if v.gadget_id == 70210003 then
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end
|
||||
|
||||
yield_return(self.base:MoveToPosition(self.pos,10,1))
|
||||
|
||||
yield_return(self:WaitTalk(0))
|
||||
if v.gadget_id==70210002 then
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:MoveByAngle(0))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self.base:MoveByAngle(0,true))
|
||||
yield_return(self.base:MoveToPosition(self.Treasurebox.transform.position,5))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(15))
|
||||
yield_return(self:WaitTalk(0))
|
||||
end
|
||||
yield_return(self:CheckTreasureDisappear())
|
||||
yield_return(self:PickItem())
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
yield_return(self.base:RunGM("WUDI OFF"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE OFF"))
|
||||
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
82
soggy_resources/lua/UAuto/TestCases/item/KapokFlower01.lua
Normal file
82
soggy_resources/lua/UAuto/TestCases/item/KapokFlower01.lua
Normal file
@@ -0,0 +1,82 @@
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
local UAutoLuaTestCase = class("KapokFlower01",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
UAutoLuaTestCase.TestFixture = "KapokFlower01"
|
||||
UAutoLuaTestCase.Category = "交互机关"
|
||||
self.Description = "打击木棉花,捡取物品"
|
||||
self.Order=706
|
||||
local StartPosition = CS.UnityEngine.Vector3(1869.9863,195.8449,-5268.864)
|
||||
local AttackPosition = CS.UnityEngine.Vector3(1865.5633,195.2825,-5264.2233)
|
||||
local MovePosition = CS.UnityEngine.Vector3(1864.9346,195.0369,-5261.4623)
|
||||
local TargetPosition = CS.UnityEngine.Vector3(1866.3359,195.3827,-5265.4314)
|
||||
UAutoLuaTestCase.SetUp = {
|
||||
Order = 0.1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:SetUpVariables())
|
||||
end)
|
||||
}
|
||||
|
||||
UAutoLuaTestCase.FindKapokFlower01 = {
|
||||
Order = 1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "瞬移到1869.9863,195.8449,-5268.864,找到木棉花,切换到绫华",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:TelePort(StartPosition))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
UAutoLuaTestCase.WaterOnKapokFlower01 = {
|
||||
Order = 2,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "使用绫华的水激流给木棉花上水",
|
||||
Action = UAutoCoroutine(function()
|
||||
|
||||
yield_return(self.base:Skill(2,false))
|
||||
yield_return(self.base:MoveToPosition(TargetPosition))
|
||||
yield_return(self.base:MoveToPosition(MovePosition))
|
||||
yield_return(self.base:MoveToPosition(TargetPosition))
|
||||
yield_return(self.base:MoveToPosition(StartPosition))
|
||||
yield_return(self.base:SkillUp(2))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
UAutoLuaTestCase.AttackKapokFlower01 = {
|
||||
Order = 3,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="攻击木棉花",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(self.base:MoveToPosition(MovePosition))
|
||||
yield_return(self.base:MoveToPosition(AttackPosition))
|
||||
local attackCount = 6
|
||||
while attackCount > 0 do
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(0.3))
|
||||
attackCount = attackCount - 1
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
UAutoLuaTestCase.GetKapokFlower01 = {
|
||||
Order = 4,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="捡取木棉花掉落物",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(self.base:MoveToPosition(TargetPosition))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(2))
|
||||
yield_return(self.base:WaitFoundAllNearbyEntities(function(result) self.items = result end))
|
||||
print(self.items)
|
||||
for k,v in pairs(self.items) do
|
||||
yield_return(self.base:MoveToPosition(v.transform.position))
|
||||
self:Pick(0)
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
63
soggy_resources/lua/UAuto/TestCases/item/PumpkinBomb01.lua
Normal file
63
soggy_resources/lua/UAuto/TestCases/item/PumpkinBomb01.lua
Normal file
@@ -0,0 +1,63 @@
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
local UAutoLuaTestCase = class("PumpkinBomb01",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
UAutoLuaTestCase.TestFixture = "PumpkinBomb01"
|
||||
UAutoLuaTestCase.Category = "交互机关"
|
||||
self.Description="爆炸南瓜"
|
||||
local PumpPosition = CS.UnityEngine.Vector3(2745.824, 194.5971, -1718.185)
|
||||
local AttackPosition = CS.UnityEngine.Vector3(2740.824, 194.5971, -1718.185)
|
||||
self.Order=707
|
||||
UAutoLuaTestCase.SetUp = {
|
||||
Order = 0.1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:SetUpVariables())
|
||||
end)
|
||||
}
|
||||
|
||||
UAutoLuaTestCase.FindPumpkinBomb01 = {
|
||||
Order = 1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="在2745.824, 194.5971, -1718.185创建爆炸南瓜",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:TelePort(PumpPosition))
|
||||
yield_return(self.base:RunGM("GADGET 70220004 1"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
UAutoLuaTestCase.FireOnPumpkinBomb01 = {
|
||||
Order = 2,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="使用安柏充能技打击南瓜",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
|
||||
self.oldCount = self.base:GetEntityCount("PumpkinBomb01")
|
||||
print(self.oldCount)
|
||||
yield_return(self.base:MoveToPosition(AttackPosition))
|
||||
yield_return(self.base:RotateCamera(PumpPosition))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE OFF"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
UAutoLuaTestCase.WaitPumpkinBombFinish = {
|
||||
Order = 3,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="等待爆炸并检查南瓜消失",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(10))
|
||||
self.newCount = self.base:GetEntityCount("PumpkinBomb01")
|
||||
print(self.newCount-self.oldCount)
|
||||
assert(self.oldCount - self.newCount >= 1, "PumpkinBomb01 not disappear")
|
||||
yield_return(self.base:RunGM("WUDI OFF"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,69 @@
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
local UAutoLuaTestCase = class("OpenTreasure01",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
UAutoLuaTestCase.TestFixture = "OpenTreasure01"
|
||||
UAutoLuaTestCase.Category = "交互机关"
|
||||
self.Description="打开01普通类型宝箱"
|
||||
self.Order=700
|
||||
UAutoLuaTestCase.SetUp = {
|
||||
Order = 0.1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:SetUpVariables())
|
||||
end)
|
||||
}
|
||||
|
||||
self.FindTreasure01 = {
|
||||
Order = 1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="瞬移到2799.7,199.6,-1742.7处的宝箱",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:TelePort(CS.UnityEngine.Vector3(2796.7,198.8336,-1742.461)))--2799.7,199.6,-1742.7
|
||||
yield_return(self.base:WaitFoundNearByEntityByName("Treasurebox01",function(result) self.Treasurebox = result end))
|
||||
yield_return(self.base:MoveToPosition(self.Treasurebox.transform.position))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OpenTreasure01 = {
|
||||
Order = 2,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="打开宝箱",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(self:WaitTalk(0))
|
||||
end)
|
||||
}
|
||||
|
||||
self.WaitTreasureBoxDisappear = {
|
||||
Order = 2.1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="验证宝箱开启后消失",
|
||||
Action = UAutoCoroutine(function ()
|
||||
local timeout=60
|
||||
while self.Treasurebox:IsDestroied() == false do
|
||||
timeout=timeout-1
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
assert(timeout>0,"宝箱没有在60s内消失")
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.GetTreasureItem = {
|
||||
Order = 3,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="捡取掉落物",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self.base:WaitFoundAllNearbyEntities(function(result) self.items = result end))
|
||||
print(self.items)
|
||||
--for k,v in pairs(self.items) do
|
||||
-- yield_return(self.base:MoveToPosition(v.transform.position))
|
||||
-- self:Pick(0)
|
||||
--end
|
||||
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,95 @@
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
local UAutoLuaTestCase = class("OpenTreasure02",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
UAutoLuaTestCase.TestFixture = "OpenTreasure02"
|
||||
UAutoLuaTestCase.Category = "交互机关"
|
||||
self.Description = "打开02类型杀怪宝箱"
|
||||
self.Order=701
|
||||
UAutoLuaTestCase.SetUp = {
|
||||
Order = 0.1,
|
||||
Type = CaseType.MonoTest,
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:SetUpVariables())
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
end)
|
||||
}
|
||||
|
||||
UAutoLuaTestCase.FindTreasure02 = {
|
||||
Order = 1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "移动到02类型宝箱",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:TelePort(CS.UnityEngine.Vector3(1975.93193,215.6965,-1481.5383)))
|
||||
yield_return(self.base:WaitFoundNearByEntityByName("SceneObj_Item_Treasurebox02",function(result) self.Treasurebox = result end))
|
||||
yield_return(self.base:MoveToPosition(self.Treasurebox.transform.position))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
UAutoLuaTestCase.OpenTreasure02FailedWhenHasMonster = {
|
||||
Order = 2,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="有怪时,开启宝箱",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(self:WaitTalk(0))
|
||||
end)
|
||||
}
|
||||
|
||||
UAutoLuaTestCase.KillMonster = {
|
||||
Order = 3,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="清怪",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end)
|
||||
}
|
||||
|
||||
UAutoLuaTestCase.OpenTreasure02 = {
|
||||
Order = 4,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="开启宝箱",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(self.base:MoveByAngle(0))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1.5))
|
||||
yield_return(self.base:MoveByAngle(0,true))
|
||||
yield_return(self.base:MoveToPosition(self.Treasurebox.transform.position))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(20))
|
||||
yield_return(self:WaitTalk(0))
|
||||
end)
|
||||
}
|
||||
|
||||
self.WaitTreasureBoxDisappear = {
|
||||
Order = 4.1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="验证宝箱开启后消失",
|
||||
Action = UAutoCoroutine(function ()
|
||||
local timeout=60
|
||||
while self.Treasurebox:IsDestroied() == false do
|
||||
timeout=timeout-1
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
assert(timeout>0,"宝箱没有在60s内消失")
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
UAutoLuaTestCase.GetTreasureItem = {
|
||||
Order = 5,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="捡取掉落物",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self.base:WaitFoundAllNearbyEntities(function(result) self.items = result end))
|
||||
print(self.items)
|
||||
for k,v in pairs(self.items) do
|
||||
if(v~=nil and v.transform~=nil) then
|
||||
yield_return(self.base:MoveToPosition(v.transform.position))
|
||||
self:Pick(0)
|
||||
end
|
||||
end
|
||||
yield_return(self.base:RunGM("WUDI OFF"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,71 @@
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
local UAutoLuaTestCase = class("OpenTreasure03",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
UAutoLuaTestCase.TestFixture = "OpenTreasure03"
|
||||
UAutoLuaTestCase.Category = "交互机关"
|
||||
self.Description="开启03类型黄金宝箱"
|
||||
self.Order=702
|
||||
UAutoLuaTestCase.SetUp = {
|
||||
Order = 0.1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:SetUpVariables())
|
||||
yield_return(self.base:RunGM("wudi on"))
|
||||
end)
|
||||
}
|
||||
|
||||
self.FindTreasure03 = {
|
||||
Order = 1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="瞬移到(2316.558 218.1997 -1111.945)找到03类型黄金宝箱",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:TelePort(CS.UnityEngine.Vector3(2316.558, 218.1997, -1111.945)))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:WaitFoundNearByEntityByName("TreasureBox03",function(result) self.Treasurebox = result end,100))
|
||||
yield_return(self.base:MoveToPosition(self.Treasurebox.transform.position,60,2))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OpenTreasure03 = {
|
||||
Order = 4,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="开启宝箱",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(self:WaitTalk(0))
|
||||
end)
|
||||
}
|
||||
|
||||
self.WaitTreasureBoxDisappear = {
|
||||
Order = 4.1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="验证宝箱开启后消失",
|
||||
Action = UAutoCoroutine(function ()
|
||||
local timeout=60
|
||||
while self.Treasurebox:IsDestroied() == false do
|
||||
timeout=timeout-1
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
assert(timeout>0,"宝箱没有在60s内消失")
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.GetTreasureItem = {
|
||||
Order = 5,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="捡取物品",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self.base:WaitFoundAllNearbyEntities(function(result) self.items = result end))
|
||||
print(self.items)
|
||||
for k,v in pairs(self.items) do
|
||||
yield_return(self.base:MoveToPosition(v.transform.position))
|
||||
yield_return(self:Pick(0))
|
||||
end
|
||||
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,102 @@
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
local UAutoLuaTestCase = class("OpenTreasure04",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
UAutoLuaTestCase.TestFixture = "OpenTreasure04"
|
||||
UAutoLuaTestCase.Category = "交互机关"
|
||||
self.Description = "打开蔓藤宝箱"
|
||||
self.Order=703
|
||||
|
||||
local AttackPosition = CS.UnityEngine.Vector3(2652.6,252,-1674.5)
|
||||
local MovePosition = AttackPosition
|
||||
|
||||
UAutoLuaTestCase.SetUp = {
|
||||
Order = 0.1,
|
||||
Description = "初始化",
|
||||
Type = CaseType.MonoTest,
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:SetUpVariables())
|
||||
end)
|
||||
}
|
||||
|
||||
UAutoLuaTestCase.FindTreasure04 = {
|
||||
Order = 1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "找到蔓藤宝箱",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:TelePort(MovePosition))
|
||||
yield_return(self.base:WaitFoundNearByEntityByName("Treasurebox04",function(result) self.Treasurebox = result end))
|
||||
yield_return(self.base:MoveToPosition(self.Treasurebox.transform.position,60,2))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
UAutoLuaTestCase.OpenTreasure04Failed = {
|
||||
Order = 4,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="不去掉蔓藤,开启宝箱失败",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(self:WaitTalk(0))
|
||||
end)
|
||||
}
|
||||
|
||||
UAutoLuaTestCase.AttackTreasure04 = {
|
||||
Order = 5,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="换成安柏,用充能技攻击宝箱",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(self.base:MoveToPosition(MovePosition))
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:RotateCamera(self.Treasurebox.transform.position))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE OFF"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
|
||||
UAutoLuaTestCase.OpenTreasure04Success = {
|
||||
Order = 5.1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="蔓藤烧毁,开启宝箱",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(self.base:MoveToPosition(self.Treasurebox.transform.position,60,2))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(5))
|
||||
yield_return(self.base:MoveToPosition(self.Treasurebox.transform.position,60,2))
|
||||
yield_return(self:WaitTalk(0))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.WaitTreasureBoxDisappear = {
|
||||
Order = 5.2,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="验证宝箱开启后消失",
|
||||
Action = UAutoCoroutine(function ()
|
||||
local timeout=60
|
||||
while self.Treasurebox:IsDestroied() == false do
|
||||
timeout=timeout-1
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
assert(timeout>0,"宝箱没有在60s内消失")
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.GetTreasureItem = {
|
||||
Order = 6,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="获取宝箱的掉落物",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(self.base:WaitFoundAllNearbyEntities(function(result) self.items = result end))
|
||||
for k,v in pairs(self.items) do
|
||||
yield_return(self.base:MoveToPosition(v.transform.position))
|
||||
self:Pick(0)
|
||||
end
|
||||
yield_return(self.base:RunGM("WUDI OFF"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,94 @@
|
||||
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
local UAutoLuaTestCase = class("OpenTreasure05",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
UAutoLuaTestCase.TestFixture = "OpenTreasure05"
|
||||
UAutoLuaTestCase.Category = "交互机关"
|
||||
self.Description = "打开05类型的冰宝箱"
|
||||
self.Order=704
|
||||
local StartPosition = CS.UnityEngine.Vector3(2540,354,-1677)
|
||||
local AttackPosition = CS.UnityEngine.Vector3(2540,354,-1674)
|
||||
|
||||
self.SetUp = {
|
||||
Order = 0.1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "初始化",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:SetUpVariables())
|
||||
yield_return(self.base:RunGM("clear all",true,true))
|
||||
end)
|
||||
}
|
||||
|
||||
self.FindTreasure05 = {
|
||||
Order = 1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "找到冰宝箱",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:TelePort(StartPosition))
|
||||
yield_return(self.base:WaitFoundNearByEntityByName("SceneObj_Item_Treasurebox05",function(result) self.Treasurebox = result end))
|
||||
yield_return(self.base:MoveToPosition(self.Treasurebox.transform.position))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OpenTreasure05Failed = {
|
||||
Order = 4,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="未烧掉冰时开启宝箱失败",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(self:WaitTalk(0))
|
||||
end)
|
||||
}
|
||||
|
||||
self.AttackTreasure05 = {
|
||||
Order = 5,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="切换安柏,使用充能技攻击冰宝箱",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(self.base:MoveToPosition(StartPosition))
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:MoveToPosition(AttackPosition))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE OFF"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.WaitTreasureBoxDisappear = {
|
||||
Order = 5.1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="验证宝箱开启后消失",
|
||||
Action = UAutoCoroutine(function ()
|
||||
local timeout=60
|
||||
while self.Treasurebox:IsDestroied() == false do
|
||||
timeout=timeout-1
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
assert(timeout>0,"宝箱没有在60s内消失")
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.GetTreasureItem = {
|
||||
Order = 6,
|
||||
Type = CaseType.MonoTest,
|
||||
Description="获取宝箱掉落物",
|
||||
Action = UAutoCoroutine(function ()
|
||||
yield_return(self.base:MoveToPosition(self.Treasurebox.transform.position))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(5))
|
||||
yield_return(self:WaitTalk(0))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(5))
|
||||
yield_return(self.base:WaitFoundAllNearbyEntities(function(result) self.items = result end))
|
||||
print(self.items)
|
||||
for k,v in pairs(self.items) do
|
||||
yield_return(self.base:MoveToPosition(v.transform.position))
|
||||
self:Pick(0)
|
||||
end
|
||||
yield_return(self.base:RunGM("WUDI OFF"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,31 @@
|
||||
--baseClass提供基础接口
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
--所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("CreateMonster",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "CreateMonster"
|
||||
self.Category = "单机场景"
|
||||
self.Description="招怪测试"
|
||||
self.Order = 2001
|
||||
|
||||
|
||||
self.Step1 = {
|
||||
Order = 1,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(21010101)
|
||||
|
||||
end)
|
||||
}
|
||||
|
||||
self.Step2 = {
|
||||
Order = 1.5,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "关AI",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
return self
|
||||
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
|
||||
@@ -0,0 +1,45 @@
|
||||
--baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
--所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("OnlineAddClient",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "OnlineAddClient"
|
||||
self.Category = "联机"
|
||||
self.Description="联机增加一台客机进入本机"
|
||||
|
||||
|
||||
|
||||
self.GetUserId = {
|
||||
Order = 0.1,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description="增加一个远程玩家,并传送到主机身边",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:FinishAllNoob())
|
||||
self.base:SetUpUserId()
|
||||
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.AddClient = {
|
||||
Order = 0.2,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description="增加一个远程玩家,并传送到主机身边",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:SetUpUserID(self.base.driver.HostUserId))
|
||||
yield_return(self:FinishAllNoob())
|
||||
local cmd ="enter " .. self.base.driver.HostUserId
|
||||
yield_return(self.base:RunGM(cmd))
|
||||
yield_return(self.base:RunGM("wudi on"))
|
||||
yield_return(self.base:Jump())
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(3))
|
||||
yield_return(self.base:Jump())
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(3))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
|
||||
return self
|
||||
93
soggy_resources/lua/UAuto/TestCases/online/OnlineBase.lua
Normal file
93
soggy_resources/lua/UAuto/TestCases/online/OnlineBase.lua
Normal file
@@ -0,0 +1,93 @@
|
||||
local baseClass = require('UAuto/Base/UAutoLuaTestBase')
|
||||
local UAutoLuaTestCase = class("OnlineBase",baseClass)
|
||||
UAutoLuaTestCase.TestFixture = "OnlineBase"
|
||||
|
||||
UAutoLuaTestCase.base = TestCaseNetworkBaseClass()
|
||||
|
||||
--setmetatable(UAutoLuaTestCase,{ __index = UAutoLuaTestCase.base })
|
||||
|
||||
local self = UAutoLuaTestCase
|
||||
|
||||
self.hostStartPos = "1955.741 196.5956 -1298.704"
|
||||
self.clientPointStr = "1962.768 197.9143 -1306.191"
|
||||
self.hostStartPosVec = CS.UnityEngine.Vector3(1955.741,196.5956,-1298.704)
|
||||
self.clientPointVec = CS.UnityEngine.Vector3(1962.768,197.9143,-1306.191)
|
||||
|
||||
|
||||
function self:GetRemoteAvatar()
|
||||
local entityManager = singletonManager:GetSingletonInstance("MoleMole.EntityManager")
|
||||
local Avatars = entityManager:GetAllAvatars()
|
||||
for k,v in pairs(Avatars) do
|
||||
if v.isAuthority==false and v:IsActive() then
|
||||
return Avatars[k]
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function self:GetLocalAvatar()
|
||||
local entityManager = singletonManager:GetSingletonInstance("MoleMole.EntityManager")
|
||||
local Avatars = entityManager:GetAllAvatars()
|
||||
for k,v in pairs(Avatars) do
|
||||
if v.isAuthority==true and v:IsActive() then
|
||||
return Avatars[k]
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function self:CheckPosition()
|
||||
return true
|
||||
end
|
||||
|
||||
function self:CheckEffect(localCount, RemoteCount)
|
||||
localCount = localCount or 0
|
||||
RemoteCount = RemoteCount or 0
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
self.EffectManager = singletonManager:GetSingletonInstance("MoleMole.EffectManager")
|
||||
self.MonoEffectList = self.EffectManager:GetEffectsByOwner(self.remoteAvater.runtimeID)
|
||||
self.LocalMonoEffectList = self.EffectManager:GetEffectsByOwner(self.base.avatar.runtimeID)
|
||||
print("local:" .. tostring(self.LocalMonoEffectList.Count))
|
||||
assert(self.LocalMonoEffectList.Count==localCount,"local avatar特效数量不正确")
|
||||
|
||||
if(self.MonoEffectList.Count>=RemoteCount) then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function self:CheckAnimation()
|
||||
return true
|
||||
end
|
||||
|
||||
function self:CheckState()
|
||||
return true
|
||||
end
|
||||
|
||||
function self:CheckRemoteAvatar(name)
|
||||
self.remote = self:GetRemoteAvatar()
|
||||
if self.remote~=nil then
|
||||
if string.find(self.remote.gameObject.name,name) then
|
||||
print(name.." Checked.")
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function self:CheckRemoteAvatarPosition(endPosition)
|
||||
self.endPoint = endPosition
|
||||
self.remote = self:GetRemoteAvatar()
|
||||
assert(self.remote~=nil,"远程玩家未找到")
|
||||
local timeout=500
|
||||
local timePassed=0
|
||||
while CS.UnityEngine.Vector3.Distance(self.remote.transform.position,self.endPoint) > 1 do
|
||||
timePassed = timePassed + CS.UnityEngine.Time.deltaTime
|
||||
assert(timeout>0,"远程玩家位置未在500ms内同步到主机,实际耗时:"..timePassed)
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(0.01))
|
||||
timeout = timeout-10
|
||||
end
|
||||
end
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,116 @@
|
||||
--baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
--所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("OnlineChangeAvatar",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "OnlineChangeAvatar"
|
||||
self.Category = "联机"
|
||||
self.Description="联机切换角色"
|
||||
|
||||
self.startPointStr = "2821.3571 211.1067 -1720.1761"
|
||||
self.startPointStr2 = "2823.3571 215.1067 -1720.1761"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
self.ClientCheckHostAvatar = {
|
||||
Order = 1,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
IsSync = IsSync.False,
|
||||
Description="客机验证主机切换角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
local timeout = 120
|
||||
local ambor=false
|
||||
local ayaka=false
|
||||
local qin=false
|
||||
local lisa=false
|
||||
while ambor==false or ayaka==false or qin==false or lisa==false do
|
||||
if self:CheckRemoteAvatar("Ambor") then
|
||||
ambor=true
|
||||
end
|
||||
if self:CheckRemoteAvatar("Ayaka") then
|
||||
ayaka=true
|
||||
end
|
||||
if self:CheckRemoteAvatar("Qin") then
|
||||
qin=true
|
||||
end
|
||||
if self:CheckRemoteAvatar("Lisa") then
|
||||
lisa=true
|
||||
end
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(0.1))
|
||||
timeout = timeout-0.1
|
||||
local log = " 安柏: "..tostring(ambor).." 绫华: "..tostring(ayaka).." 琴: "..tostring(qin).." 丽莎: "..tostring(lisa)
|
||||
assert(timeout>0,"客机验证切换角色失败 "..log)
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
self.HostChangeAvatar = {
|
||||
Order = 2,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description="主机切换角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self:ChangeAvatar("Qin"))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self:ChangeAvatar("Lisa"))
|
||||
end)
|
||||
}
|
||||
|
||||
self.ClientChangeAvatar = {
|
||||
Order = 3,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description="客机切换角色",
|
||||
IsSync = IsSync.False,
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self:ChangeAvatar("Qin"))
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
yield_return(self:ChangeAvatar("Lisa"))
|
||||
end)
|
||||
}
|
||||
|
||||
self.HostCheckClientAvatar = {
|
||||
Order = 4,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description="主机验证客机切换角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
local timeout = 120
|
||||
local ambor=false
|
||||
local ayaka=false
|
||||
local qin=false
|
||||
local lisa=false
|
||||
while ambor==false or ayaka==false or qin==false or lisa==false do
|
||||
if self:CheckRemoteAvatar("Ambor") then
|
||||
ambor=true
|
||||
end
|
||||
if self:CheckRemoteAvatar("Ayaka") then
|
||||
ayaka=true
|
||||
end
|
||||
if self:CheckRemoteAvatar("Qin") then
|
||||
qin=true
|
||||
end
|
||||
if self:CheckRemoteAvatar("Lisa") then
|
||||
lisa=true
|
||||
end
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(0.1))
|
||||
timeout = timeout-0.1
|
||||
local log = " 安柏: "..tostring(ambor).." 绫华: "..tostring(ayaka).." 琴: "..tostring(qin).." 丽莎: "..tostring(lisa)
|
||||
assert(timeout>0,"主机验证切换角色失败 "..log)
|
||||
end
|
||||
|
||||
end)
|
||||
}
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,109 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("OnlineElementElectric",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "OnlineElementElectric"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-怪物元素-电"
|
||||
|
||||
self.MonsterId = 20010601
|
||||
self.MonsterKeyWord = "Slime_Electric_03"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
self.localHostStartPos = self.hostStartPos
|
||||
self.localClientPointStr = self.clientPointStr
|
||||
self.localHostStartPosVec = self.hostStartPosVec
|
||||
self.localClientPointVec = self.clientPointVec
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.localHostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:MoveToPosition(self.localHostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.localClientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.localClientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
--self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self.base:RunGM("MONSTER "..self.MonsterId.." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:StartSyncRecord(0,true))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostFireAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机火攻怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckFireAttack = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证火攻怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,157 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("OnlineElementFire",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "OnlineElementFire"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-怪物元素-火"
|
||||
|
||||
self.MonsterId = 20011301
|
||||
self.MonsterKeyWord = "Slime_Fire_03"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Razor"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
--self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self.base:RunGM("MONSTER "..self.MonsterId.." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:StartSyncRecord(0,true))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostElectricAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机电攻怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckElectricAttack = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证电攻怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostIceAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机冰攻怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckIceAttack = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证冰攻怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostWaterAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机水攻怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckWaterAttack = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证水攻怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,106 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("OnlineElementGrass",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "OnlineElementGrass"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-怪物元素-草"
|
||||
|
||||
self.MonsterId = 20010101
|
||||
self.MonsterKeyWord = "Slime_Grass_02"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
--self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self.base:RunGM("MONSTER "..self.MonsterId.." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:StartSyncRecord(0,true))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostFireAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机火攻怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(4))
|
||||
-- 等待草史莱姆头上的草烧掉
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(10))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckFireAttack = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证火攻怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,111 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("OnlineElementIce",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "OnlineElementIce"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-怪物元素-冰"
|
||||
|
||||
self.MonsterId = 20010901
|
||||
self.MonsterKeyWord = "Slime_Ice_03"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
self.localHostStartPos = self.hostStartPos
|
||||
self.localClientPointStr = self.clientPointStr
|
||||
self.localHostStartPosVec = self.hostStartPosVec
|
||||
self.localClientPointVec = self.clientPointVec
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.localHostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:MoveToPosition(self.localHostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.localClientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.localClientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
--self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self.base:RunGM("MONSTER "..self.MonsterId.." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:StartSyncRecord(0,true))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostFireAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机火攻怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(4))
|
||||
-- 等待冰史莱姆头上的冰烧掉
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(10))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckFireAttack = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证火攻怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,158 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("OnlineElementWater",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "OnlineElementWater"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-怪物元素-水"
|
||||
|
||||
self.MonsterId = 20011001
|
||||
self.MonsterKeyWord = "Slime_Water_02"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
--self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self.base:RunGM("MONSTER "..self.MonsterId.." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:StartSyncRecord(0,true))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostFireAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机火攻怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckFireAttack = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证火攻怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostIceAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机冰攻怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckIceAttack = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证冰攻怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostElectricAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机电攻怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Razor"))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckElectricAttack = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证电攻怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
282
soggy_resources/lua/UAuto/TestCases/online/monster/AbyssFire.lua
Normal file
282
soggy_resources/lua/UAuto/TestCases/online/monster/AbyssFire.lua
Normal file
@@ -0,0 +1,282 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("AbyssFire01",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "AbyssFire01"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-深渊巫师-火"
|
||||
|
||||
self.MonsterId = 22010101
|
||||
self.MonsterKeyWord = "Abyss_Fire_01"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
self.base:MonsterGod()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(20))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能3",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,3)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能3一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能4",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,4)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能4一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
self.base:MonsterGod(false)
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
279
soggy_resources/lua/UAuto/TestCases/online/monster/AbyssIce.lua
Normal file
279
soggy_resources/lua/UAuto/TestCases/online/monster/AbyssIce.lua
Normal file
@@ -0,0 +1,279 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("AbyssIce01",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "AbyssIce01"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-深渊巫师-冰"
|
||||
|
||||
self.MonsterId = 22010201
|
||||
self.MonsterKeyWord = "Abyss_Ice_01"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(20))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能3",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,3)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能3一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能4",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,4)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能4一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,279 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("AbyssWater01",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "AbyssWater01"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-深渊巫师-水"
|
||||
|
||||
self.MonsterId = 22010301
|
||||
self.MonsterKeyWord = "Abyss_Water_01"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(20))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能3",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,3)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能3一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能4",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,4)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能4一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,328 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("BruteNoneShield",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "BruteNoneShield"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-暴徒-无-巨盾"
|
||||
|
||||
self.MonsterId = 21020101
|
||||
self.MonsterKeyWord = "Brute_None_Shield"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能3",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,3)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能3一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能4",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,4)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能4一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill5 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能5",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,5)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill5 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能5一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill6 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能6",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,6)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill6 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能6一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,278 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("DefenderNone01",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "DefenderNone01"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-空手遗迹守卫"
|
||||
|
||||
self.MonsterId = 23040101
|
||||
self.MonsterKeyWord = "Defender_None_01"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能3",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,3)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能3一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill5 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能5",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,5)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill5 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能5一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,252 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("ElementalWind01",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "ElementalWind01"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-元素球-风"
|
||||
|
||||
self.MonsterId = 20020101
|
||||
self.MonsterKeyWord = "Elemental_Wind_01"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
186
soggy_resources/lua/UAuto/TestCases/online/monster/HiliNone.lua
Normal file
186
soggy_resources/lua/UAuto/TestCases/online/monster/HiliNone.lua
Normal file
@@ -0,0 +1,186 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("HiliNone01",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "HiliNone01"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-空手丘丘人"
|
||||
|
||||
self.MonsterId = 21010101
|
||||
self.MonsterKeyWord = "Hili_None_01"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("Level 1"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:RunGM("Level 1"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.base:MonsterAI(true)
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
self.localAvatar = self:GetLocalAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.localAvatar.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,333 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("HiliNone01Club",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "HiliNone01Club"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-空手丘丘人-近战"
|
||||
|
||||
self.MonsterId = 21010201
|
||||
self.MonsterKeyWord = "Hili_None_01"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.base:MonsterAI(true)
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
self.localAvatar = self:GetLocalAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.localAvatar.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能3",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,3)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能3一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能4",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,4)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能4一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill5 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能5",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,5)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill5 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能5一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill7 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能7",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,7)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill7 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能7一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill8 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能8",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,8)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill8 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能8一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,333 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("HiliNone01Range",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "HiliNone01Range"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-空手丘丘人-远程"
|
||||
|
||||
self.MonsterId = 21010401
|
||||
self.MonsterKeyWord = "Hili_None_01"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.base:MonsterAI(true)
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
self.localAvatar = self:GetLocalAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.localAvatar.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能3",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,3)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能3一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能4",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,4)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能4一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill5 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能5",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,5)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill5 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能5一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill7 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能7",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,7)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill7 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能7一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill8 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能8",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,8)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill8 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能8一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,333 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("HiliNone01Shield",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "HiliNone01Shield"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-空手丘丘人-小盾"
|
||||
|
||||
self.MonsterId = 21010301
|
||||
self.MonsterKeyWord = "Hili_None_01"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.base:MonsterAI(true)
|
||||
yield_return(CS.UnityEngine.WaitForSeconds(1))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
self.localAvatar = self:GetLocalAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.localAvatar.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能3",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,3)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能3一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能4",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,4)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能4一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill5 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能5",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,5)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill5 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能5一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill7 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能7",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,7)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill7 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能7一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill8 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能8",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,8)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill8 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能8一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,228 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("ShamanGrass01",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "ShamanGrass01"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-丘丘萨满-草"
|
||||
|
||||
self.MonsterId = 21030201
|
||||
self.MonsterKeyWord = "Shaman_Grass_01"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,228 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("ShamanWater01",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "ShamanWater01"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-丘丘萨满-水"
|
||||
|
||||
self.MonsterId = 21030101
|
||||
self.MonsterKeyWord = "Shaman_Water_01"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,228 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("ShamanWind01",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "ShamanWind01"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-丘丘萨满-风"
|
||||
|
||||
self.MonsterId = 21030301
|
||||
self.MonsterKeyWord = "Shaman_Wind_01"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,228 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("SlimeElectric02",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "SlimeElectric02"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-电史莱姆-中"
|
||||
|
||||
self.MonsterId = 20010501
|
||||
self.MonsterKeyWord = "Slime_Electric_02"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,228 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("SlimeElectric03",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "SlimeElectric03"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-电史莱姆-大"
|
||||
|
||||
self.MonsterId = 20010601
|
||||
self.MonsterKeyWord = "Slime_Electric_03"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,228 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("SlimeElectric03Positive",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "SlimeElectric03Positive"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-电史莱姆-大-正"
|
||||
|
||||
self.MonsterId = 20010701
|
||||
self.MonsterKeyWord = "Slime_Electric_03_Positive"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
203
soggy_resources/lua/UAuto/TestCases/online/monster/SlimeFire.lua
Normal file
203
soggy_resources/lua/UAuto/TestCases/online/monster/SlimeFire.lua
Normal file
@@ -0,0 +1,203 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("SlimeFire02",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "SlimeFire02"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-火史莱姆-中"
|
||||
|
||||
self.MonsterId = 20011201
|
||||
self.MonsterKeyWord = "Slime_Fire_02"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,253 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("SlimeFire03",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "SlimeFire03"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-火史莱姆-大"
|
||||
|
||||
self.MonsterId = 20011301
|
||||
self.MonsterKeyWord = "Slime_Fire_03"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能3",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,3)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能3一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,253 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("SlimeGrass02",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "SlimeGrass02"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-草史莱姆-中"
|
||||
|
||||
self.MonsterId = 20010101
|
||||
self.MonsterKeyWord = "Slime_Grass_02"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能3",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,3)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能3一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,353 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("SlimeGrass03",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "SlimeGrass03"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-草史莱姆-大"
|
||||
|
||||
self.MonsterId = 20010201
|
||||
self.MonsterKeyWord = "Slime_Grass_03"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能3",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,3)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能3一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能4",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,4)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能4一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill5 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能5",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,5)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill5 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能5一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill6 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能6",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,6)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill6 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能6一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill7 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能7",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,7)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill7 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能7一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
178
soggy_resources/lua/UAuto/TestCases/online/monster/SlimeIce.lua
Normal file
178
soggy_resources/lua/UAuto/TestCases/online/monster/SlimeIce.lua
Normal file
@@ -0,0 +1,178 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("SlimeIce02",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "SlimeIce02"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-冰史莱姆-中"
|
||||
|
||||
self.MonsterId = 20010801
|
||||
self.MonsterKeyWord = "Slime_Ice_02"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,278 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("SlimeIce03",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "SlimeIce03"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-冰史莱姆-大"
|
||||
|
||||
self.MonsterId = 20010901
|
||||
self.MonsterKeyWord = "Slime_Ice_03"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能3",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,3)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能3一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能4",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,4)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能4一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
203
soggy_resources/lua/UAuto/TestCases/online/monster/SlimeRock.lua
Normal file
203
soggy_resources/lua/UAuto/TestCases/online/monster/SlimeRock.lua
Normal file
@@ -0,0 +1,203 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("SlimeRock02",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "SlimeRock02"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-岩史莱姆-中"
|
||||
|
||||
self.MonsterId = 20011401
|
||||
self.MonsterKeyWord = "Slime_Rock_02"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,228 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("SlimeRock03",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "SlimeRock03"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-岩史莱姆-大"
|
||||
|
||||
self.MonsterId = 20011501
|
||||
self.MonsterKeyWord = "Slime_Rock_03"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能3",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,3)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能3一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,178 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("SlimeWater02",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "SlimeWater02"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-水史莱姆-中"
|
||||
|
||||
self.MonsterId = 20011001
|
||||
self.MonsterKeyWord = "Slime_Water_02"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
@@ -0,0 +1,228 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("SlimeWater03",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "SlimeWater03"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-水史莱姆-大"
|
||||
|
||||
self.MonsterId = 20011101
|
||||
self.MonsterKeyWord = "Slime_Water_03"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 3
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能2",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,2)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能2一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能4",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,4)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill4 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能4一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能3",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,3)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill3 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能3一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
203
soggy_resources/lua/UAuto/TestCases/online/monster/SlimeWind.lua
Normal file
203
soggy_resources/lua/UAuto/TestCases/online/monster/SlimeWind.lua
Normal file
@@ -0,0 +1,203 @@
|
||||
-- baseClass提供基础接口
|
||||
local baseClass = require('UAuto/TestCases/Online/OnlineBase')
|
||||
-- 所有testcase继承baseClass
|
||||
local UAutoLuaTestCase = class("SlimeWind02",baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "SlimeWind02"
|
||||
self.Category = "联机"
|
||||
self.Description = "联机-风史莱姆-中"
|
||||
|
||||
self.MonsterId = 20010301
|
||||
self.MonsterKeyWord = "Slime_Wind_02"
|
||||
-- c#中写了120,这边先写着不改
|
||||
self.FindTimeOut = 120
|
||||
-- 胖怪先填3,瘦怪填1
|
||||
self.FatRange = 1
|
||||
|
||||
|
||||
self.OrderIndex = 1
|
||||
self.SetUpHost = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "初始化主机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.hostStartPos,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToPosition(self.hostStartPosVec))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.SetUpClient = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "初始化客机角色位置",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.clientPointStr,true,true))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self:ChangeAvatar("Barbara"))
|
||||
yield_return(self.base:MoveToPosition(self.clientPointVec))
|
||||
self.base:MonsterAI(false)
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostCreateMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机招怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CreateMonster(self.MonsterId)
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientFindMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪创建",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:WaitFoundEntity(self.MonsterKeyWord))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪移动至客机角色",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("AUTHORITY REFRESH"))
|
||||
self.remoteAvater = self:GetRemoteAvatar()
|
||||
yield_return(self.base:MonsterMove(self.foundEntity,self.remoteAvater.transform.position))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckMonsterMove = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证怪移动",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能0",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,0)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill0 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能0一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机怪放技能1",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
self.base:MonsterDoSkill(self.foundEntity,1)
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckSkill1 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证技能1一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机攻击怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity,self.FindTimeOut,self.FatRange))
|
||||
yield_return(self.base:Skill(0))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckAttackMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证攻击怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.HostKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Host,
|
||||
Description = "主机杀死怪",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:StartSyncRecord(self.foundEntity.runtimeID,true))
|
||||
yield_return(self.base:StartSyncRecord())
|
||||
yield_return(self.base:RunGM("kill monster "..tostring(self.MonsterId)))
|
||||
yield_return(self.base:StopSyncRecord())
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.ClientCheckKillMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
RunMode = RunMode.Client,
|
||||
Description = "客机验证杀死怪一致性",
|
||||
Action = UAutoCoroutine(function()
|
||||
self.base:CheckRemote()
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user