This commit is contained in:
Akbar Yahya
2022-11-21 16:30:31 +08:00
commit e0d4d8040c
3326 changed files with 683000 additions and 0 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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