Giter VIP home page Giter VIP logo

developer's Introduction

developer

写在前面

本工具是在spring(java 1.8)系列下,自动拉取接口并生成接口文档,在此基础之上构建了单接口测试、接口流程自动化测试、mock数据自动生成。 国内用户可访问:https://gitee.com/gomcarter/developer

一、快速开始:

下载安装压缩包: 戳这里

1,导入mysql表结构

需要mysql5.7版本及以上,SQL文件:戳这里

2,配置数据库连接

修改database.properties文件:

#主库配置
write.jdbc.url=jdbc:mysql://127.0.0.1:3306/developer?useUnicode=true&characterEncoding=utf8&failOverReadOnly=false&useSSL=false
write.jdbc.user=root
write.jdbc.password=root123

3,启动服务

如需更换端口,请自行修改

sh startup.sh

4,使用

其他项目接入使用参考:戳这里

5,配置发者中心

打开开发者中心:http://developer.server:port

默认登录账号/密码: admin/admin

a,配置前端系统,需要根据接口的第一个目录开区分给哪个端提供的接口,如

http://xserver.com/endpoint1/xxxhttp://xserver.com/endpoint2/yyyhttp://xserver.com/endpoint3/zzz

endpoint1,endpoint2,endpoint3用来区分哪个端提供的接口,所以对接口的设计有要求, 如图:

image

b,配置java模块:意思其实就是 java 项目,配置这个 java 项目的信息

image

c,接口详情

image image

d,接口测试

image

二、接口自动化测试

1,配置用例

image image

2,执行用例

image

注:要使用接口自动化测试,接口需要支持跨域访问(可以在测试环境开启)
String o = request.getHeader("Origin");
// 允许跨域访问
response.setHeader("Access-Control-Allow-Origin", o);
// 跨域带cookie
response.setHeader("Access-Control-Allow-Credentials", "true");
// 支持的http method
response.addHeader("Access-Control-Allow-Methods", "GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE");
// 支持http请求携带的header头
response.addHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, 其他支持携带的header");

注:当然在nginx配置跨域访问也可以

三、用户管理

1,自带用户管理

image

2,连接外部登录

image

四、mock

自动生成mock地址,调用mock地址将返回mock数据

image

五、帮助

如需帮助请联系:[email protected] 或者 qq: 506598720

欢迎提issue和需求!

developer's People

Contributors

gomcarter avatar

Stargazers

liuao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.