每Facebook应用程序500测试用户的极限 - 我应该存根自动化负载测试我的应用程序Facebook的API? [英] Limit of 500 test users per Facebook app - should I stub the Facebook API for automated load testing my app?

查看:182
本文介绍了每Facebook应用程序500测试用户的极限 - 我应该存根自动化负载测试我的应用程序Facebook的API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个自动化测试脚本来创建测试用户并将其相互连接为朋友装入我的应用程序的测试和轮廓部分。

I am working on an automated test script to create test users and connect them as friends with each other to load test and profile parts of my app.

测试用户文档指出每个应用程序最多500个测试用户的限制。
https://developers.facebook.com/docs/test_users/

The test user documentation states a limit of a maximum 500 test users per application. https://developers.facebook.com/docs/test_users/

这是应用程序可以创建多达500个测试用户开始测试的应用程序。如果超出了测试用户的限制,您可以创建一个应用程序,您将收到一个错误。

An app can create up to 500 test users to start testing an app. If you exceed the limit of test users you can create for an app you will receive an error.

还有其他人在那里曾经需要推过去这个限制,以及你是如何实现与用户社区的测试大于500?我想与谁拥有2000和3000的Facebook朋友之间的用户测试。是的,这些字符是在那里在现实世界:)注:按注释下面是极不寻常的发现这样大量的好友连接的用户。请参阅链接到统计的评论。

Anyone else out there ever needed to push past this limit, and how did you achieve testing with communities of users larger than 500? I want to test with users who have between 2000 and 3000 Facebook friends. Yes, such characters are out there in the real world :) Note: as per a comment below it is highly unusual to find users with such large numbers of friend connections. See the comment for a link to stats.

这我尝试用一​​种选择是创建多个应用程序和朋友应用程序之间的测试用户,这似乎是可能的。这似乎是,虽然不必要的工作。

One option which I'm experimenting with is to create multiple apps and "friend" the test users between apps, which seems to be possible. This seems like unnecessary work though.

我也在考虑存根与我自己的本地服务器Facebook的API,但是这也觉得不妥。有可能是轻易做​​这个库?

I'm also considering stubbing the Facebook API with my own local server, but this feels wrong too. There might be libraries for doing this easily?

推荐答案

由于没有人回答了这个相当长一段时间,我想我只是张贴我解决了这个现在的样子,万一有人需要它的一些一天。

Since no one has answered this for quite a while, I thought I'd just post the way I solved this for now, in case someone else needs it some day.

Facebook允许您添加和共享多个应用程序之间的测试用户,而您是管理员。

Facebook allows you to add and "share" test users between multiple apps for which you are an administrator.

所以,我创建了一些额外的测试Facebook应用为我自己,除了一我已经测试。

Therefore, I created several extra test Facebook apps for myself, besides the one I am already testing.

然后,我增加了近500个测试用户对每个(使用创建测试用户API调用)。

Then I added almost 500 test users to each (using the create test user API call).

我那么相关的一些现有的芯的测试在所有的应用程序的用户从原来的测试应用(请参阅下面有关如何执行此文档)采取额外的应用程序到自己的极限500

I then associated some existing "core" test users across all the apps from the original test application (see below for documentation on how to do this) taking the additional apps up to their 500 limit.

在所有测试的应用程序中添加了芯的用户,我再发,在每个测试程序的其他所有用户的核心的用户朋友们(这需要每个测试的应用程序中完成的 - 使用IE访问额外的测试应用程序,而不是原始应用程序)的标记。

Once the "core" users were added across all the test apps, I then made the "core" users friends with all the other users in each test app (this needs to be done within each test app - ie using the access tokens of the additional test app, not the original app).

最后的结果是,从原来的应用程序中的核心群体是朋友从原来的应用程序之外的用户,让他们的朋友列表,以超越500人工测试用户限制增长于是从原来的应用程序,我现在有核心用户的集合因为我ppared去创造的麻烦$ p $,分批不到规模500谁可以有很多的朋友。

The final result is that the "core" group from the original app are friends with users from outside the original app, allowing their friend list to grow beyond the artificial testing user limit of 500. So from the original app I now have a collection of core users who can have as many friends as I'm prepared to go to the hassle of creating, in batches just under 500 in size.

有可能是一个更简单的方法,但这是它现在。

There might be an easier way, but that's it for now.

我没有探索存根Facebook的API的想法 - 仍然是一个有趣的想法。

I didn't explore the idea of stubbing the Facebook API - still an interesting idea!

从文档:

添加现有的测试用户的其他应用程序

您可以通过使用图形API与您要添加用户到应用程序访问令牌添加现有测试用户到其他应用程序。

You can add existing test users to other apps by using the Graph API with the app access token that you're adding the user to.

https://graph.facebook.com/APP_ID/accounts/test-users
   安装=真
   &安培;权限= read_stream
   &安培; UID = TEST_USER_ID
   &安培; owner_access_token = APP_ACCESS_TOKEN_OWNER
   &安培; =的access_token APP_ACCESS_TOKEN
   &安培;方法=岗位
  参数:

https://graph.facebook.com/APP_ID/accounts/test-users? installed=true &permissions=read_stream &uid=TEST_USER_ID &owner_access_token=APP_ACCESS_TOKEN_OWNER &access_token=APP_ACCESS_TOKEN &method=post Parameters:

发表于:现有的测试用户的用户ID

uid : User id of the existing test user

owner_access_token:用于创建测试用户的应用程序的应用程序的访问令牌

owner_access_token : App access token of the app used to create the test user

Facebook的测试用户文档: http://developers.facebook.com/docs/test_users/

这篇关于每Facebook应用程序500测试用户的极限 - 我应该存根自动化负载测试我的应用程序Facebook的API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆