RESTFeel: 一個(gè)企業(yè)級(jí)的API管理&測(cè)試平臺(tái)。RESTFeel幫助你設(shè)計(jì)、開(kāi)發(fā)、測(cè)試您的API

RESTFeel

RESTFeel: 一個(gè)企業(yè)級(jí)的API管理&測(cè)試平臺(tái)。RESTFeel幫助你設(shè)計(jì)、開(kāi)發(fā)、測(cè)試您的API。

功能簡(jiǎn)介:

  • 請(qǐng)求生成器-使HTTP請(qǐng)求輕松。
  • 請(qǐng)求樹(shù)以樹(shù)的形式組織請(qǐng)求。
  • 合作-添加團(tuán)隊(duì)成員,管理多個(gè)項(xiàng)目。
  • PDF報(bào)告-生成項(xiàng)目狀態(tài)報(bào)告PDF格式。
  • 歷史-查看歷史/活動(dòng)日志。
  • 自定義的時(shí)間間隔運(yùn)行API項(xiàng)目。
  • SendGrid - SendGrid集成發(fā)送通知。
  • 云部署-它可以部署在任何服務(wù)器上,也可以用來(lái)作為一個(gè)基于云的托管Web應(yīng)用程序。
  • 私人-安裝在您的環(huán)境和完全擁有它。與你的團(tuán)隊(duì)一起在你的私人網(wǎng)絡(luò)中工作。
  • 數(shù)據(jù)庫(kù)-存儲(chǔ)在您的數(shù)據(jù)庫(kù)中的一切。
  • swagger API文檔生成。
  • 標(biāo)簽-標(biāo)簽提供了一個(gè)有用的方式來(lái)組合相關(guān)的要求。
  • 安全,訪問(wèn)控制,通知機(jī)制等。
RESTFeel接口測(cè)試平臺(tái)
RESTFeel接口測(cè)試平臺(tái)

MongoDB configuration:

Building From Source

Prerequisites
  • JDK 7 or later

  • Maven 3.0+

  • Gradle 2.4 (Optional)

  • MongoDB 3.x

Build
mvn clean install
Run
mvn spring-boot:run
Access

The build file is configured to download and use an embedded Tomcat server. So the application should be up and running by using just two commands mentioned above. Once the server is started, the application can be accessed using http://localhost:8080.

Default login email / password : rf@example.com / rf
Debug
mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"

Note : To avoid java.lang.OutOfMemoryError: PermGen space, use the following command:

MAVEN_OPTS="-XX:PermSize=256m -XX:MaxPermSize=512m" mvn spring-boot:run 

Go to src/main/resources/env-development.properties and update mongodb properties. Here is how the sample configuration looks like:

mongodb.name=restfiddle

mongodb.host=localhost

mongodb.port=27017

mongodb.username=

mongodb.password=
Steps to re-build the database:
1. Stop RESTFiddle server, if running.
2. Start MongoDB, if not running.
    Here is the command I use : "C:\Program Files\MongoDB\bin\mongod.exe" --dbpath C:\Users\ANUJA\Documents\restfiddle\data
3. Connect to MongoDB.
    Here is one of the ways to connect to MongoDB : 
    Go to "C:\Program Files\MongoDB\bin" folder and run "mongo" command.
    Then run "use restfiddle" command and finally "db.dropDatabase()" command to delete the existing RESTFiddle database.
    Note : you will see following message on the command prompt : { "dropped" : "restfiddle", "ok" : 1 }
4. Start RESTFiddle application (mvn spring-boot:run) - This will create and initialize the database.
Steps to recover database:
Sometimes MongoDB doesn't start and shows message:
        old lock file: C:\Users\ANUJA\Documents\restfiddledata\data\mongod.lock. probably means unclean shutdown
Run repair operation to recover your database
    "C:\Program Files\MongoDB\bin\mongod.exe" --dbpath C:\Users\ANUJA\Documents\restfiddledata\data --repair
Most likely, your data will be repaired with the --repair option. In case it doesn't, delete the mongod.lock file and then run the above --repair command.

MongoDB配置數(shù)據(jù)庫(kù)用戶名密碼

Step1.首先,切換到admin db (schema):

> use admin;
switched to db admin

Step2.在該 schema 下面設(shè)置用戶名,密碼:


> db.createUser({ user: "root",pwd: "root",customData:{name:"root"},roles:[{ role: "userAdminAnyDatabase",db: "admin" }]})
Successfully added user: {
    "user" : "root",
    "customData" : {
        "name" : "root"
    },
    "roles" : [
        {
            "role" : "userAdminAnyDatabase",
            "db" : "admin"
        }
    ]
}
> db.auth('root','root')
1

Step3.admin中直接給restfiddle權(quán)限

var r = 
    {
      "_id": "restfiddle.root",
      "user": "root",
      "db": "restfiddle",
      "credentials": {
        "SCRAM-SHA-1": {
          "iterationCount": 10000,
          "salt": "riZjwBYHvkcV99typ8BRMA==",
          "storedKey": "E2QOruLrBNXD1mlQTX0TQogL/ws=",
          "serverKey": "JEQhfa/5x7+aNzKrFvKRkctXXfQ="
        }
      },
      "roles": [
        {
          "role": "dbOwner",
          "db": "restfiddle"
        },
        {
          "role": "read",
          "db": "restfiddle"
        },
        {
          "role": "readWrite",
          "db": "restfiddle"
        }
      ]
    }


db.system.users.insert(r)


或者

use restfiddle
db.createUser({"user":"jason","pwd":"123456","roles":["dbOwner","read","readWrite"]})

可以看到admin中已經(jīng)有了jason這個(gè)管理員:

> use admin;
> db.system.users.find();

{
  "_id": "restfiddle.jason",
  "user": "jason",
  "db": "restfiddle",
  "credentials": {
    "SCRAM-SHA-1": {
      "iterationCount": 10000,
      "salt": "HZsutqbxGjKVkPcY4305FQ==",
      "storedKey": "bynL9UW9cIf0iPOLo9pGwCFz638=",
      "serverKey": "PRPKH+7dVaKDJ/JE+7ZjQUe3whA="
    }
  },
  "roles": [
    {
      "role": "dbOwner",
      "db": "restfiddle"
    },
    {
      "role": "read",
      "db": "restfiddle"
    },
    {
      "role": "readWrite",
      "db": "restfiddle"
    }
  ]
}

Fetched 4 record(s) in 9ms

參考文章:

《MongoDB極簡(jiǎn)教程》第一章 安裝&環(huán)境配置

《MongoDB極簡(jiǎn)教程》第二章 MongoDB 基本命令

源自開(kāi)源項(xiàng)目:
RESTFiddle

An Enterprise-grade API Management Platform for Teams. RESTFiddle helps you design, develop, test and release APIs.

Some of the key features of this platform are:

  • Request Builder - Make HTTP requests with ease.
  • Request Tree - Organize requests in the form of a tree.
  • Collaboration - Add as many collaborators as you want from your team and work together on a project.
  • PDF Reports - Generate project status reports in PDF format.
  • Integration - RESTFiddle platform exposes APIs for everything it has.
  • History - Unlimited history/activity log.
  • Scheduler - Run API projects on predefined time intervals.
  • SendGrid - SendGrid integration to send notifications.
  • Cloud Deployment - It can be deployed over any server and can also be used as a cloud based hosted web application.
  • Private - Install it in your environment and own it completely. Work together with your team in your private network.
  • Database - Store everything in your database.
  • Swagger - Access RESTFiddle API documentation using Swagger UI.
  • Tagging - Tags provide a useful way to group related requests together.
  • Open Source - Fork it and build the features of your choice.
  • More - Security, Access Control, Notifications and much more.

A lot of powerful features coming soon!

Who Uses RESTFiddle

The following is a list of companies and projects using RESTFiddle:

Want to be added to this section? Email me at contact at bootsimply dot com.

For Gradle Users:

Build war

Unix :

./gradlew clean war

Windows :

gradlew.bat clean war

Run

Unix :

./gradlew bootRun

Windows :

gradlew.bat bootRun

Debugging in Windows : Add the following to build.gradle file and then run the above command

applicationDefaultJvmArgs = [
    "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000"
]

Using MongoDB 3.x

Windows

Download the latest MongoDB version. After kappa release, RESTFiddle has enabled authentication and moved to version 3.0. To start using this, create a configuration file mongo.conf at a location.e.g. F:\restfiddledata. Create mongo.log file for logging e.g. F:\restfiddledata\log\ This is how configuration file looks like:

bind_ip = 127.0.0.1
 
port = 27017
 
quiet = true
 
dbpath=F:\restfiddledata\data0
  
logpath=F:\restfiddledata\log\mongo.log
 
logappend = true

Start MongoDB without authentication.

"C:\Program Files\MongoDB\Server\3.0\bin\mongod.exe" --config F:\restfiddledata\mongo.conf  

On another command prompt go to C:\Program Files\MongoDB\Server\3.0\bin and type command mongo. This opens Mongo Shell.
Create user here.

use restfiddle
db.createUser({"user":"rf","pwd":"rf","roles":["dbOwner","read","readWrite"]})

Now stop the database and restart it so that it checks for authentication

"C:\Program Files\MongoDB\Server\3.0\bin\mongod.exe" --auth --config F:\restfiddledata\mongo.conf

Start the RESTFiddle application using the same command as earlier

mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
Mac

Deployment

You can deploy the war file to Tomcat 7.0.52, Jetty, or any other container, as long as it supports servlet 3.0.

Technology Stack

Contribute

You're interested in contributing to RESTFiddle? AWESOME. Here are the basic steps:

Code formatting :
GitHub help :
Google Group :

https://groups.google.com/forum/#!forum/restfiddle

Meetup Group :

http://www.meetup.com/RESTFiddle

Gitter :

https://gitter.im/AnujaK/restfiddle

Code Quality :

https://nemo.sonarqube.org/overview?id=com.restfiddle%3Arestfiddle

Releases

https://github.com/AnujaK/restfiddle/releases

Support

If you need help in setting up RESTFiddle for your Team/Organization, feel free to contact me at this email address.

Copyright and License

Copyright 2015 BootSimply Solutions

Licensed under Apache License, Version 2.0

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • afinalAfinal是一個(gè)android的ioc,orm框架 https://github.com/yangf...
    wgl0419閱讀 6,568評(píng)論 1 9
  • 新課程的實(shí)施旨在滌蕩“應(yīng)試文化”的污泥濁水,徹底變革傳統(tǒng)的非人性的課程。倡導(dǎo)為學(xué)生提供多元發(fā)展的空間,引導(dǎo)學(xué)生“學(xué)...
    yinyuelin閱讀 235評(píng)論 0 1
  • 在我懂人事開(kāi)始知曉有婆婆、夫家這一類(lèi)生物存在之后,我經(jīng)常被洗腦,同時(shí)我也腦補(bǔ)各種畫(huà)面,成功滴將與夫家有關(guān)的一切,尤...
    自由譯員Scar閱讀 396評(píng)論 2 2
  • 一個(gè)平常的晚自習(xí),我正寫(xiě)著作業(yè)。突然間,我的視線看不見(jiàn)了?!霸趺椿厥拢俊弊谖遗赃叺男“缀芤苫?。那些說(shuō)閑話的...
    盡喬閱讀 362評(píng)論 0 3

友情鏈接更多精彩內(nèi)容