1"use strict";(self.webpackChunkmy_website=self.webpackChunkmy_website||[]).push([[112],{5680:(e,t,n)=>{n.d(t,{xA:()=>c,yg:()=>m});var a=n(6540);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),p=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),u=p(n),g=r,m=u["".concat(l,".").concat(g)]||u[g]||d[g]||i;return n?a.createElement(m,s(s({ref:t},c),{},{components:n})):a.createElement(m,s({ref:t},c))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,s=new Array(i);s[0]=g;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[u]="string"==typeof e?e:r,s[1]=o;for(var p=2;p<i;p++)s[p]=n[p];return a.createElement.apply(null,s)}return a.createElement.apply(null,n)}g.displayName="MDXCreateElement"},6191:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>i,metadata:()=>o,toc:()=>p});var a=n(8168),r=(n(6540),n(5680));const i={slug:"/AI/genassertion"},s=void 0,o={unversionedId:"AI/AI Generate Assertion",id:"AI/AI Generate Assertion",title:"AI Generate Assertion",description:"Feature Overview",source:"@site/docs/22-AI/10-AI Generate Assertion.md",sourceDirName:"22-AI",slug:"/AI/genassertion",permalink:"/wiki/docs/AI/genassertion",draft:!1,tags:[],version:"current",sidebarPosition:10,frontMatter:{slug:"/AI/genassertion"},sidebar:"docs",previous:{title:"AI Generate Function",permalink:"/wiki/docs/AI/genfunction"},next:{title:"AI Polish Document",permalink:"/wiki/docs/AI/polishdoc"}},l={},p=[{value:"Feature Overview",id:"feature-overview",level:2},{value:"Core Capabilities",id:"core-capabilities",level:2},{value:"Usage Method",id:"usage-method",level:2},{value:"1. Enter the interface URL address and click Send",id:"1-enter-the-interface-url-address-and-click-send",level:3},{value:"2. Click the "AI Generate Assertion" button",id:"2-click-the-ai-generate-assertion-button",level:3},{value:"3. Add Custom Assertions (Optional)",id:"3-add-custom-assertions-optional",level:3},{value:"4. Adjust and Optimize (Optional)",id:"4-adjust-and-optimize-optional",level:3},{value:"5. Click "Insert Usage" to Use",id:"5-click-insert-usage-to-use",level:3},{value:"Technical Support",id:"technical-support",level:2}],c={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,r.yg)(u,(0,a.A)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.yg)("h2",{id:"feature-overview"},"Feature Overview"),(0,r.yg)("p",null,"The ",(0,r.yg)("inlineCode",{parentName:"p"},"AI Generate Assertion")," feature automatically analyzes interface response body structures to quickly generate JavaScript assertion scripts, helping developers efficie
1ntly complete interface test validation. Supports one-click generation of basic assertions and on-demand supplemental custom assertions."),(0,r.yg)("h2",{id:"core-capabilities"},"Core Capabilities"),(0,r.yg)("p",null,"\u2705 ",(0,r.yg)("strong",{parentName:"p"},"Smart Analysis"),": Automatically identifies response body field types and structures",(0,r.yg)("br",{parentName:"p"}),"\n","\u2705 ",(0,r.yg)("strong",{parentName:"p"},"Batch Generation"),": Generates multiple key assertion statements at once",(0,r.yg)("br",{parentName:"p"}),"\n","\u2705 ",(0,r.yg)("strong",{parentName:"p"},"Flexible Supplementation"),": Appends specific assertions based on user descriptions",(0,r.yg)("br",{parentName:"p"}),"\n","\u2705 ",(0,r.yg)("strong",{parentName:"p"},"Plug-and-Play"),": Generated code can be directly inserted into test cases "),(0,r.yg)("h2",{id:"usage-method"},"Usage Method"),(0,r.yg)("h3",{id:"1-enter-the-interface-url-address-and-click-send"},"1. Enter the interface URL address and click Send"),(0,r.yg)("p",null,(0,r.yg)("img",{parentName:"p",src:"https://assets.echoapi.com/upload/user/225720086282256384/log/57b905dc-610f-4263-849f-a0f07fe99a9e.png",alt:"image.png",title:"image.png"})),(0,r.yg)("h3",{id:"2-click-the-ai-generate-assertion-button"},'2. Click the "AI Generate Assertion" button'),(0,r.yg)("p",null,"After obtaining the interface's real-time response, click the ",(0,r.yg)("inlineCode",{parentName:"p"},"AI Generate Assertion")," button in the response area "),(0,r.yg)("p",null,(0,r.yg)("img",{parentName:"p",src:"https://assets.echoapi.com/upload/user/225720086282256384/log/3207a414-09e7-4047-aea9-a0b1904508d8.png",alt:"image.png",title:"image.png"})),(0,r.yg)("h3",{id:"3-add-custom-assertions-optional"},"3. Add Custom Assertions (Optional)"),(0,r.yg)("p",null,"Describe special requirements in the supplementary input box, e.g., ",(0,r.yg)("inlineCode",{parentName:"p"},'"Need to verify roles include admin and token validity is greater than current time"'),", then click Send "),(0,r.yg)("p",null,(0,r.yg)("img",{parentName:"p",src:"https://assets.echoapi.com/upload/user/225720086282256384/log/94aca133-d43c-48e2-9359-c58b7b5ea5b4.png",alt:"image.png",title:"image.png"})),(0,r.yg)("h3",{id:"4-adjust-and-optimize-optional"},"4. Adjust and Optimize (Optional)"),(0,r.yg)("p",null,"Modify the generated assertion script in the editor "),(0,r.yg)("p",null,(0,r.yg)("img",{parentName:"p",src:"https://assets.echoapi.com/upload/user/225720086282256384/log/39ab5703-7bea-4878-9671-400d03cca8d8.png",alt:"image.png",title:"image.png"})),(0,r.yg)("h3",{id:"5-click-insert-usage-to-use"},'5. Click "Insert Usage" to Use'),(0,r.yg)("p",null,"The generated assertion script will automatically be added to the current interface's ",(0,r.yg)("inlineCode",{parentName:"p"},"Post-response")," under the script name ",(0,r.yg)("inlineCode",{parentName:"p"},"AI Assertion")," "),(0,r.yg)("p",null,(0,r.yg)("img",{parentName:"p",src:"https://assets.echoapi.com/upload/user/225720086282256384/log/16102dd9-450b-414a-957b-ac46872c8d9e.png",alt:"image.png",title:"image.png"})),(0,r.yg)("p",null,(0,r.yg)("img",{parentName:"p",src:"https://assets.echoapi.com/upload/user/225720086282256384/log/b2619c18-2937-4013-b720-333b22b03ade.png",alt:"image.png",title:"image.png"})),(0,r.yg)("h2",{id:"technical-support"},"Technical Support"),(0,r.yg)("p",null,"For issues or feature suggestions, contact our ","[Technical Support Team]",".",(0,r.yg)("br",{parentName:"p"}),"\n","\ud83d\udcee Email: ",(0,r.yg)("a",{parentName:"p",href:"https://mail.google.com/mail/u/0/?fs=1&tf=cm&source=mailto&[email protected]"},"[email protected]")))}d.isMDXComponent=!0}}]);
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.