开发测试数据-通过API批量生成

参考网址

Random User Generator | Home

背景

在日常开发过程中,可能需要一些批量的用户数据,方便开发与测试。

Random User是一个基于Web 的api服务

网址:https://randomuser.me

 从网址上就能理解,它是用来帮我们生成用户信息的。

简单使用

调用api

url:https://randomuser.me/api/

在浏览器上输入url,并打开

 

 

 

 开发测试数据-通过API批量生成

 

 

 

开发测试数据-通过API批量生成
 1 {
 2 "results": [
 3 {
 4 "gender": "male",
 5 "name": {
 6 "title": "Mr",
 7 "first": "Ege",
 8 "last": "Özkara"
 9 },
10 "location": {
11 "street": {
12 "number": 9698,
13 "name": "Abanoz Sk"
14 },
15 "city": "Karaman",
16 "state": "Samsun",
17 "country": "Turkey",
18 "postcode": 35154,
19 "coordinates": {
20 "latitude": "79.1797",
21 "longitude": "-67.2571"
22 },
23 "timezone": {
24 "offset": "-2:00",
25 "description": "Mid-Atlantic"
26 }
27 },
28 "email": "ege.ozkara@example.com",
29 "login": {
30 "uuid": "5f5f6da4-1a66-45aa-89ba-c6e84a0bb763",
31 "username": "redostrich788",
32 "password": "maxmax",
33 "salt": "hMxAuNOV",
34 "md5": "e2455e698308cfd4765a984bd25c36fc",
35 "sha1": "4aeb8cfda7ec02b4f6b1cd35d9dae5063336bbc4",
36 "sha256": "626106c5abf144218c28006c6992f2fdf3c269b64183751735c734fb425843a8"
37 },
38 "dob": {
39 "date": "1966-10-13T13:20:45.561Z",
40 "age": 55
41 },
42 "registered": {
43 "date": "2017-10-08T16:27:30.471Z",
44 "age": 4
45 },
46 "phone": "(260)-764-4157",
47 "cell": "(314)-856-8614",
48 "id": {
49 "name": "",
50 "value": null
51 },
52 "picture": {
53 "large": "https://randomuser.me/api/portraits/men/50.jpg",
54 "medium": "https://randomuser.me/api/portraits/med/men/50.jpg",
55 "thumbnail": "https://randomuser.me/api/portraits/thumb/men/50.jpg"
56 },
57 "nat": "TR"
58 }
59 ],
60 "info": {
61 "seed": "3724764486dcae77",
62 "results": 1,
63 "page": 1,
64 "version": "1.3"
65 }
66 }
View Code

 

上一篇:LINUX系统编程-- 8 进程间通信


下一篇:现代大学英语精读第二版(第一册)学习笔记(原文及全文翻译)——1B - Making the Grade(取得好成绩)