Commit 2f8419cf authored by 谢昇's avatar 谢昇

Update Jmeter进行WebSocket接口测试.md

parent 9fa74878
# WebSocket原理
# WebSocket原理
......@@ -35,3 +35,17 @@ WebSocket在建立握手时,数据是通过HTTP传输的。但是建立之后
我们准备好这些jar包后,讲它们拷贝到Jmeter目录的\lib\ext\目录下。
![图片1](https://gitlab.33.cn/flyaway53/test/raw/master/img-folder/%E5%88%98%E9%94%90/%E5%9B%BE%E7%89%871.png)
![图片2](https://gitlab.33.cn/flyaway53/test/raw/master/img-folder/%E5%88%98%E9%94%90/%E5%9B%BE%E7%89%872.png)
# 聊天室项目WebSocket接口测试
## 普及知识
1. cookie:
网站中,http请求是无状态的,即使第一次和服务器连接后并且登录成功后,第二次请求服务器依然不能知道当前请求是哪个用户。cookie的出现就是为了解决这个问题,第一次登录后服务器返回一些数据(cookie)给浏览器,然后浏览器保存在本地,当该用户发送第二次请求的时候,就会自动的把上次请求存储的cookie数据自动的携带给服务器,服务器通过浏览器携带的数据就能判断当前用户是哪个了。cookie存储的数据量有限,但一般不超过4KB。因此使用cookie只能存储一些小量的数据。
2. session:
session和cookie的作用有点类似,都是为了存储用户相关的信息。不同的是session存储在服务器。存储在服务器的数据会更加的安全,不容易被窃取,弊端就是会占用服务器的资源。
![图片3](https://gitlab.33.cn/flyaway53/test/raw/master/img-folder/%E5%88%98%E9%94%90/%E5%9B%BE%E7%89%873.png)
![图片9](https://gitlab.33.cn/flyaway53/test/raw/master/img-folder/%E5%88%98%E9%94%90/%E5%9B%BE%E7%89%879.png)
![图片4](https://gitlab.33.cn/flyaway53/test/raw/master/img-folder/%E5%88%98%E9%94%90/%E5%9B%BE%E7%89%874.png)
![图片5](https://gitlab.33.cn/flyaway53/test/raw/master/img-folder/%E5%88%98%E9%94%90/%E5%9B%BE%E7%89%875.png)
![图片6](https://gitlab.33.cn/flyaway53/test/raw/master/img-folder/%E5%88%98%E9%94%90/%E5%9B%BE%E7%89%876.png)
![图片7](https://gitlab.33.cn/flyaway53/test/raw/master/img-folder/%E5%88%98%E9%94%90/%E5%9B%BE%E7%89%877.png)
![图片8](https://gitlab.33.cn/flyaway53/test/raw/master/img-folder/%E5%88%98%E9%94%90/%E5%9B%BE%E7%89%878.png)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment