wloe2gf 发表于 2024-8-22 15:39:32

游戏测试中,这几个接口测试知识点不可忽略


    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">游戏行业的测试,业务规则上会<span style="color: black;">按照</span><span style="color: black;">每一个</span>项目的<span style="color: black;">区别</span>进行<span style="color: black;">调节</span>,<span style="color: black;">因此</span>是属于需要<span style="color: black;">按照</span><span style="color: black;">每一个</span><span style="color: black;">区别</span>项目组去适当<span style="color: black;">调节</span>工作内容。</span></span><strong style="color: blue;"><span style="color: black;"><span style="color: black;">客户端部分是基于引擎较多,</span></span><span style="color: black;"><span style="color: black;">介于游戏<span style="color: black;">由于</span>封装的关系,除非在二端内部写完整过程的代码,但这个难度<span style="color: black;">亦</span>太大。</span></span></strong><span style="color: black;"> <span style="color: black;">我<span style="color: black;">供给</span><span style="color: black;">有些</span>思路<span style="color: black;">便是</span>从</span> c-&gt;s 入手,<span style="color: black;">守护</span>起来<span style="color: black;">亦</span>比较简单,以下<span style="color: black;">文案</span>介绍。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;"><span style="color: black;">→ 游戏内通信对象大体三类:</span></span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">§&nbsp;</span><span style="color: black;">c-&gt;s</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">§&nbsp;</span><span style="color: black;">s-&gt;c</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">§&nbsp;</span><span style="color: black;">s-&gt;s</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">这点和软件是<span style="color: black;">同样</span>的,<span style="color: black;">外边</span>就多</span>1个平台。</span><span style="color: black;">游戏行业做接口测试基本<span style="color: black;">亦</span>和其他类型测试<span style="color: black;">同样</span>。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;"><span style="color: black;">这儿</span>先介绍下,需要先准备:</span></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">§&nbsp;</span><span style="color: black;"><span style="color: black;">游戏后台开启</span></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">§&nbsp;</span><span style="color: black;"><span style="color: black;">起码</span>2个游戏客户端。<span style="color: black;">另一</span>1个客户端观察游戏内的<span style="color: black;">状况</span>。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;"><span style="color: black;">→ 下面举两个例子</span></span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">先找</span>1个触发器,<span style="color: black;">这儿</span>用的是聊天框,代码如下(貌似没.lua的)。(</span><span style="color: black;"><span style="color: black;">代码参考还是上面的</span> 2)部分里的内容,1)<span style="color: black;">表率</span>原来的。)</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">function</span><span style="color: black;">Chat:rueryChatCache()</span><span style="color: black;">local</span><span style="color: black;">msg</span><span style="color: black;">=</span><span style="color: black;">"cQueryChatCache"</span><span style="color: black;">app.net:sendMsg(msg)</span><span style="color: black;">end</span><span style="color: black;">function</span><span style="color: black;">Chat:requestChat(chatType,</span><span style="color: black;">name,</span><span style="color: black;">content)</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">--1)正常<span style="color: black;">状况</span></span><span style="color: black;">local</span><span style="color: black;">msg</span><span style="color: black;">=</span><span style="color: black;">"cChat "</span><span style="color: black;">..</span><span style="color: black;">chatType</span><span style="color: black;">..</span><span style="color: black;">" "</span><span style="color: black;">..</span><span style="color: black;">name</span><span style="color: black;">..</span><span style="color: black;">" "</span><span style="color: black;">..</span><span style="color: black;">content</span><span style="color: black;">app.net:sendMsg(msg)</span><span style="color: black;">end</span><span style="color: black;">function</span><span style="color: black;">Chat:requestChat(5,</span><span style="color: black;">damao,</span><span style="color: black;">cQueryDailyTask)</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">--2)<span style="color: black;">运用</span>聊天框做触发器输出协议</span><span style="color: black;">local</span><span style="color: black;">msg</span><span style="color: black;">=</span><span style="color: black;">"cChat "</span><span style="color: black;">..</span><span style="color: black;">chatType</span><span style="color: black;">..</span><span style="color: black;">" "</span><span style="color: black;">..</span><span style="color: black;">name</span><span style="color: black;">..</span><span style="color: black;">" "</span><span style="color: black;">..</span><span style="color: black;">content</span><span style="color: black;">app.net:sendMsg(content)</span><span style="color: black;">end</span><span style="color: black;">function</span><span style="color: black;">Chat:requestChat(1,</span><span style="color: black;">damao,</span><span style="color: black;">msgtxt)</span><span style="color: black;">--2)用于修改chatType类型</span><span style="color: black;">local</span><span style="color: black;">msg</span><span style="color: black;">=</span><span style="color: black;">"cChat "</span><span style="color: black;">..</span><span style="color: black;">chatType</span><span style="color: black;">..</span><span style="color: black;">" "</span><span style="color: black;">..</span><span style="color: black;">name</span><span style="color: black;">..</span><span style="color: black;">" "</span><span style="color: black;">..</span><span style="color: black;">content</span><span style="color: black;">app.net:sendMsg(msg)</span><span style="color: black;">end</span><span style="color: black;">function</span><span style="color: black;">Chat:requestPublishNotice(content)</span><span style="color: black;">local</span><span style="color: black;">msg</span><span style="color: black;">=</span><span style="color: black;">"cAnnounce "</span><span style="color: black;">..</span><span style="color: black;">content</span><span style="color: black;">app.net:sendMsg(msg)</span><span style="color: black;">end</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;"><span style="color: black;">* <span style="color: black;">第1</span>个例子:需要<span style="color: black;">检测</span>的协议</span></span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">1) cChat eChatType(1=私聊 2=本服 4=世界 3=公会 5=系统 服务器触发 不受理客户端 6=gm公告) toName Content</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">需要分别<span style="color: black;">检测</span></span> cChat类型。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">修改</span>chatType1,2,3,4,5…分别输出。</span><span style="color: black;"><span style="color: black;">其中在<span style="color: black;">另一</span></span>1个客户端开<span style="color: black;">另一</span>1个帐号就<span style="color: black;">能够</span>看到文本里的内容。<span style="color: black;">或</span>在后台<span style="color: black;">能够</span><span style="color: black;">表示</span>输出内容</span><span style="color: black;"><span style="color: black;">其中输出类型</span>5,<span style="color: black;">另一</span>1个客户端是不可见的。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;"><span style="color: black;">* 第</span>2个例子:</span><span style="color: black;">协议(用于社交关系变更)</span><span style="color: black;">2)cBlacklistModify nType(1=拉黑 2=撤销) idTarget</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">cBlacklistModify nType</span><span style="color: black;">2个类型的测试,<span style="color: black;">能够</span><span style="color: black;">同期</span>对1个有效的用户名。</span><span style="color: black;"><span style="color: black;">检测</span>s-&gt;c回来的内容</span></span><span style="color: black;">nType 1or2 idTarget 传不存在的用户,<span style="color: black;">检测</span>s-&gt;c回来的内容</span><span style="color: black;"><span style="color: black;"><span style="color: black;">这般</span><span style="color: black;">能够</span>简化测试,并且不会有遗漏,绕过了<span style="color: black;">非常多</span>操作<span style="color: black;">过程</span>。<span style="color: black;">详细</span><span style="color: black;">能够</span>想想平时你<span style="color: black;">怎样</span>拉黑的。</span></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;"><span style="color: black;">→ 再介绍</span>1个好东西,关于<span style="color: black;">能够</span><span style="color: black;">方便</span>的调用接口的方式</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">c-&gt;s的<span style="color: black;">信息</span>都<span style="color: black;">能够</span>用以下<span style="color: black;">照片</span>里的,后面2段内容,在chat聊天界面输出就<span style="color: black;">能够</span>自动调用c-&gt;s的协议内容。(</span><span style="color: black;"><span style="color: black;">例如:</span>cQueryDailyTask 请求任务</span><span style="color: black;"><span style="color: black;">代码参考还是上面的</span> 2)部分里的内容,1)<span style="color: black;">表率</span>原来的。)</span></p><span style="color: black;"><span style="color: black;">在游戏后面,有<span style="color: black;">非常多</span>协议需要<span style="color: black;">按照</span><span style="color: black;">检测</span>成功和失败的返回参数,<span style="color: black;">亦</span>需要进行创造力的去组合测试。在<span style="color: black;">实质</span>工作中,<span style="color: black;">非常多</span></span></span><span style="color: black;"><span style="color: black;">游戏中都会存在<span style="color: black;">有些</span>协议文档的内容。<span style="color: black;">通常</span><span style="color: black;">状况</span>下,</span></span><span style="color: black;"><span style="color: black;">协议的说明需要被单独抽离出来。</span></span><img src="https://mmbiz.qpic.cn/mmbiz_png/vSFkiadk0nxqlbKQCbkAdfqwm6ribLAaBtsY2R5ticCQLugCL2f1ooXj40mWn2WMZoZE3uWQ3hF3lJ1VUn19uK0jw/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">平时<span style="color: black;">守护</span>的话,<span style="color: black;">便是</span><span style="color: black;">倘若</span>协议不失效,就<span style="color: black;">能够</span><span style="color: black;">始终</span><span style="color: black;">运用</span>;失效就需要备注去掉。内容被修改的话,&nbsp;<span style="color: black;">亦</span>需要在文本里备注说明。并且,<span style="color: black;">必定</span>要把所有文本放在</span><span style="color: black;">1个目录下,后期<span style="color: black;">运用</span>notepad类似工具,<span style="color: black;">能够</span>读取<span style="color: black;">查询</span><span style="color: black;">详细</span>协议类。</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/vSFkiadk0nxr1Wb0MYUvIMSZrR1DdYClpQRcqc8kOxbqDOkcfljU4Mtk81eSBRDMqe7CzNpNrSCicRrlI7vIybMQ/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p><img src="https://mmbiz.qpic.cn/mmbiz_gif/vSFkiadk0nxqlbKQCbkAdfqwm6ribLAaBtMuyncch7nNibAuolWLVs55s9k2NKgs5v2meY4qqnFVONian8P4Iiae8MQ/640?wx_fmt=gif&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1" style="width: 50%; margin-bottom: 20px;">
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;"><span style="color: black;"><strong style="color: blue;">就业喜报|</strong></span><strong style="color: blue;"><span style="color: black;">《2020年flag:</span></strong><strong style="color: blue;"><span style="color: black;">拼不了爹,就拼命学习</span></strong></a><strong style="color: blue;">做高薪榜榜首》</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;"><span style="color: black;"><strong style="color: blue;">学员故事|</strong></span><strong style="color: blue;"><span style="color: black;">《30是道坎,迈<span style="color: black;">欠好</span>是门槛,迈好了是跳板</span></strong><strong style="color: blue;"><span style="color: black;">》</span></strong></a></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;"><span style="color: black;"><strong style="color: blue;">在线课程|</strong></span><strong style="color: blue;"><span style="color: black;">《速成班开课了!</span></strong><strong style="color: blue;"><span style="color: black;">52天后<span style="color: black;">她们</span>将进入IT行业</span></strong><strong style="color: blue;"><span style="color: black;">》</span></strong></a></p><img src="https://mmbiz.qpic.cn/mmbiz_png/vSFkiadk0nxqlbKQCbkAdfqwm6ribLAaBtgsfjdFccFdwRL6X0JFz8onpKIAQHED6FWPsJVKU4KibZazC0b8BCNicw/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;">
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">点击,识别下方二维码,<span style="color: black;">认识</span>软件测试<span style="color: black;">关联</span>课程。</p><img src="https://mmbiz.qpic.cn/mmbiz_jpg/vSFkiadk0nxqlbKQCbkAdfqwm6ribLAaBteMeDibMXMLxHbmwL8NyuP1NLsjDGNUcsOy0ODgsn3DhXSfibv93o0TrA/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/vSFkiadk0nxqlbKQCbkAdfqwm6ribLAaBtfUj6M9tmKSGmn1U8LAaGiaMAdvhLBJjh5l7wM3kmgSeTwZrL9F00pcw/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;">
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">点击,识别下方右侧二维码,获取软件测试技术贴。</p><img src="https://mmbiz.qpic.cn/mmbiz_png/vSFkiadk0nxqlbKQCbkAdfqwm6ribLAaBtBAb7WR9JicKbqMEm3XiblQqLIfEKuTPn0leT6ta4UWnPm0KDUKW7tv4w/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/vSFkiadk0nxqlbKQCbkAdfqwm6ribLAaBtuyiby6glG9OJPggCax0k1LztE7XL10tttbIHTrjkFREyAiaTmXxV4LWA/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"><img src="https://mmbiz.qpic.cn/mmbiz_gif/vSFkiadk0nxqlbKQCbkAdfqwm6ribLAaBtCyF7DiatojHZLUCJdEa4uXaMmHAxuj2EbOenltRZ41fUXD8Mlsc9BGA/640?wx_fmt=gif&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1" style="width: 50%; margin-bottom: 20px;">
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">点击下方</span><span style="color: black;"><strong style="color: blue;"><span style="color: black;">“阅读原文”</span></strong></span><span style="color: black;">,挑战 <span style="color: black;"><strong style="color: blue;">年薪20万</strong></span> ~</span></p>




听听海 发表于 2024-8-27 16:09:16

楼主的文章非常有意义,提升了我的知识水平。

听听海 发表于 2024-9-3 20:43:36

大势所趋,用于讽刺一些制作目的就是为了跟风玩梗,博取眼球的作品。

wrjc1hod 发表于 2024-10-17 13:56:09

太棒了、厉害、为你打call、点赞、非常精彩等。

j8typz 发表于 2024-10-28 17:40:29

谷歌网站排名优化 http://www.fok120.com/

qzmjef 发表于 2024-10-30 05:56:46

软文发布平台 http://www.fok120.com/
页: [1]
查看完整版本: 游戏测试中,这几个接口测试知识点不可忽略