我正在运行具有以下属性值的线程组:
线程数:200加速时间(秒):20循环计数:2
我还为HTTP请求设置了用户定义的变量.但是,当达到第二次迭代时,我还需要更改用户定义变量的值.
8080 - 托管后端的端口4200 - 我的Angular2前端
在My Angular2项目中,我有文件proxy.config.json,内容如下
{
"/api": {
"target": "http://localhost:8080",
"secure": false,
"changeOrigin": "true",
"pathRewrite": {"^/api": ""}
}
}
Run Code Online (Sandbox Code Playgroud)
在Angular2 package.json中,我将启动过程更改为"start": "ng serve --proxy-config proxy.config.json"
当我在命令器中输入时,npm start然后在开始时我可以看到代理创建:/ api - > http:// localhost:8080.好吧,到目前为止我觉得很好.
我正在尝试发送请求(Angular2)
constructor(private http: Http) {
this.getUsers();
}
getUsers(): any {
return this.http.get("/api/getusers")
.subscribe(response => {
console.log(response);
})
}
Run Code Online (Sandbox Code Playgroud)
我收到一个错误http:// localhost:4200/api/getusers 404(Not Found).我们可以看到,没有任何代理.为什么?我做错什么了吗?
visual studio代码的控制台输出是
10% building modules 2/2 modules 0 active[HPM] Proxy created: /api/ -> http://localhost:8080
[HPM] Proxy rewrite rule created: …Run Code Online (Sandbox Code Playgroud) 我正在测试一个负载测试网站,其中包含以下页面
我想用不同数量的用户同时发送每个页面的请求.现在我按照以下方式执行此操作线程1(用户500)
线程2(300位用户)
线程3(100位用户)
但是当我使用登录功能时,如何实现此任务,因为登录请求设置了一些cookie数据和其他有关用户和Post页面的信息也需要来自Selected Blog Page的一些数据.我想实现以下目标:让我们假设有500个用户登录,然后300个用户应该点击博客页面,100个用户点击选定博客页面,100个用户点击博客页面上的帖子,但所有事情都应该同时进行.