1"use strict";(globalThis.webpackChunkatsf4g_co_docs||=[]).push([[8167],{3779(e,t,s){s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>n,toc:()=>o});const n=JSON.parse('{"id":"development/testing","title":"\u5355\u5143\u6d4b\u8bd5","description":"\u73b0\u6709\u6d4b\u8bd5","source":"@site/docs/development/testing.md","sourceDirName":"development","slug":"/development/testing","permalink":"/development/testing","draft":false,"unlisted":false,"editUrl":"https://github.com/atframework/atsf4g-co/edit/main/doc/docs/development/testing.md","tags":[],"version":"current","frontMatter":{"title":"\u5355\u5143\u6d4b\u8bd5"},"sidebar":"docs","previous":{"title":"Excel \u914d\u7f6e\u5f00\u53d1","permalink":"/development/excel-config"},"next":{"title":"RPC \u5355\u5143\u6d4b\u8bd5\uff08\u79bb\u7ebf mock\uff09","permalink":"/development/rpc-unit-test"}}');var r=s(6070),c=s(3797);const i={title:"\u5355\u5143\u6d4b\u8bd5"},l="\u5355\u5143\u6d4b\u8bd5",d={},o=[{value:"\u73b0\u6709\u6d4b\u8bd5",id:"\u73b0\u6709\u6d4b\u8bd5",level:2},{value:"RPC \u5355\u5143\u6d4b\u8bd5\uff08\u79bb\u7ebf mock\uff09",id:"rpc-\u5355\u5143\u6d4b\u8bd5\u79bb\u7ebf-mock",level:2}];function a(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,c.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"\u5355\u5143\u6d4b\u8bd5",children:"\u5355\u5143\u6d4b\u8bd5"})}),"\n",(0,r.jsx)(t.h2,{id:"\u73b0\u6709\u6d4b\u8bd5",children:"\u73b0\u6709\u6d4b\u8bd5"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\u6846\u67b6\u4f7f\u7528 atframe_utils \u7684\u79c1\u6709\u6d4b\u8bd5\u6846\u67b6\uff08",(0,r.jsx)(t.code,{children:"CASE_TEST"}),"\uff0c\u975e GTest\uff09\uff1b"]}),"\n",(0,r.jsxs)(t.li,{children:["\u7ec4\u4ef6\u6d4b\u8bd5\u5728 ",(0,r.jsx)(t.code,{children:"src/component/test/"}),"\uff08\u5982 ",(0,r.jsx)(t.code,{children:"ItemAlgorithmTest"})," \u80cc\u5305\u683c\u5b50\u7b97\u6cd5\uff09\uff1b"]}),"\n",(0,r.jsxs)(t.li,{children:["\u6784\u5efa\uff1a",(0,r.jsx)(t.code,{children:"-DPROJECT_ENABLE_UNITTEST=YES"})," \u540e\u7528 CTest \u8fd0\u884c\uff1a"]}),"\n"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-powershell",children:"cmake --build <BUILD_DIR> --config Debug\r\nctest --test-dir <BUILD_DIR> -C Debug --output-on-failure\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Windows \u4e0b\u82e5\u6d4b\u8bd5\u542f\u52a8\u5931\u8d25\uff08DLL \u627e\u4e0d\u5230\uff09\uff0c\u68c0\u67e5 PATH \u662f\u5426\u5305\u542b\u4f9d\u8d56 DLL \u76ee\u5f55\uff08\u89c1\r\n",(0,r.jsx)(t.code,{children:".agents/skills/testing/"}),"\uff09\u3002"]}),"\n",(0,r.jsx)(t.h2,{id:"rpc-\u5355\u5143\u6d4b\u8bd5\u79bb\u7ebf-mock",children:"RPC \u5355\u5143\u6d4b\u8bd5\uff08\u79bb\u7ebf mock\uff09"}),"\n",(0,r.jsxs)(t.p,{children:["\u5df2\u5b9e\u73b0\uff1a",(0,r.jsx)(t.code,{children:"src/tools/rpc-unit-test/"})," \u5728",(0,r.jsx)(t.strong,{children:"\u4e0d\u8d77\u771f\u5b9e Redis/DNS/atbus/\u7f51\u5173"}),"\u7684\u524d\u63d0\u4e0b\u8dd1\u771f\u5b9e\u751f\u6210\u7684\r\nRPC/dispatcher/task\uff0c\u7528\u5185\u5b58 mock \u5f15\u64ce\u66ff\u4ee3\u5168\u90e8\u5916\u90e8\u4f9d\u8d56\uff08SS/DNS/CS/DB/UUID/resource/HPA/telemetry\uff09\u3002\u5b8c\u6574\u7684\r\n\u5de5\u4f5c\u539f\u7406\u3001\u4f7f\u7528\u6307\u5357\u4e0e\u8bed\u4e49\u5951\u7ea6\u89c1 ",(0,r.jsx)(t.a,{href:"rpc-unit-test",children:"RPC \u5355\u5143\u6d4b\u8bd5\uff08\u79bb\u7ebf mock\uff09"}),"\u3002"]})]})}function h(e={}){const{wrapper:t}={...(0,c.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.