1.Mock out unstable problems.
2. Construct complex data quickly.
3. Quickly construct an exception scenario.



Server-side Mock platform






















  • Multi-protocol support: Http(S), Dubbo, Sofa, Hsf(Edas), and some RPC requests.
  • Multi-format support: Support some common Json, Xml, and other custom formats are supported.
  • Tagging: For management, there is a tagging management that can quickly locate the mocks we need.
  • Dynamic expression: if we want to return the result is not the most simple, so a static text, our hope is that it can output the current date, or some simple logical operations, hope he has one of the most simple dynamic functions, or simple, for example, that is to say we hope he has some interaction with the attendance.
  • Multi-port: support any port request, avoid the development of modified code.
  • Mock exception: Http exception Code, Rpc exception class










































Dynamic Mock support























Match rule













Pre-steps:



The Mock to record:
 
Built-in modules:
The callback:
































Question 1: What if I want to return different values for different input parameters?
Answer 1:
Question 2: How does the development code work with changes after using the Mock platform?
Answer 2:
Question 3: Suppose I have the same interface, and I have different projects developing in parallel, but I want the call of project A to return A, and project B to return B. What if we only have one Mock platform?
Answer 3:
Question 4: For RPC requests, it might be uploading the API package to a mock platform. Some students may say that his API package is not in one, but scattered into various Jar packages how to do?
 
Answer 4:
Question 5: What if I’m just starting and I only need one method from the Mock service?



Answer 5:
Q6: Some students may find that if I Mock a request, there may be many mocks and all of them will match. Which Mock will be called?
 
Answer 6:



PDF download:
The attachment



Live recap:
Click to view