I have been wanting to write an article about how auto how we test interaction with Facebook ges now
Hello, everyone! For a long time now, I have been planning to compose a write-up exactly how testing that is automated create at Badoo. I desired to publish something will be both intriguing and of good use. I desired to fairly share experiences that could be very easy to put in training in virtually any system. And from now on the right time has comeвЂ¦
As much of you realize, Badoo is really a myspace and facebook which centers on finding brand new buddies and acquaintances. Probably the most tasks that are important has to take care of is user verification.
We’ve other ways of confirming users. A few of these are pretty standard, such as for instance verification utilizing a telephone number. Addititionally there is a more method that is unusual verification by picture. Nevertheless the easiest and fastest means is verification via utilizing internet sites.
This implies of verifying a profile can be acquired from the comfort of as soon as a profile is created/registered with a social networking. To begin with, it really is fast: one simply click with no dependence on any steps that are additional a phone or web cam. Next, its convenient, since, about yourself instead of entering them manually if you want, you can import photographs and information.
Today I wish to let you know about exactly how registration and verification via Twitter is initiated on Badoo and just how we taught Selenium some recent tests to test them.
Therefore, the step by step list is prepared, you have got launched the make sure it passes. All things are wonderful. Time for you be because pleased as this kitten!
We commit the test rule towards the branch, deliver the duty for head and review down to get a coffee. But it to the kitchen there is a message вЂ” the task has not passed the review because the test doesnвЂ™t work before we make. One thing moved wrongвЂ¦
It becomes clear that the problem is as follows: the FB account in question already has a Badoo profile after we have restarted the test. In the place of registering a unique profile, the test straight away authorises the one that is existing. ThereвЂ™s nothing else you need to delete the profile once the test is finished for it. Fortunately, we possess the amazing QaApi!
In the past, I told the whole story of exactly just just how QaApi is integrated with your auto-tests. The piece was entitled, вЂњSelenium tests. From RC plus one individual to WebDriver, Page Object and a pool of users.вЂќ
In brief, that is A api that is internal which you are able to deliver a request and perform various actions from the app side from inside the test. It really is really simple to trigger:
It goes without stating that QaApi is just in a position to make use of test users and it is just accessible via an intranet.
Once the test had learnt to delete a person after it self, it beginning working regularly and well. However for very long.
Phases of Badoo testing
Very nearly at every meeting we tell individuals just what stages that are testing have actually within our business. I want to briefly list people who are of great interest through the viewpoint of Selenium tests:
To begin with, we ran devel environment and staging tests. But, as time passes, we found in conclusion we must be in a position to run shot tests too. Associated with fairly simple: devel doesnвЂ™t constantly copy production ideally, which is perhaps not just a thing that is good get a bug in the staging phase and eliminate the event through the launch. This means the duty wonвЂ™t ensure it is into this launch and certainly will make it down later than prepared.
LetвЂ™s make contact with our test. That is amazing you might be that self-same QA engineer whom happens to be tasked with teaching the enrollment test to your workplace in parallel on a few shots as well as on staging.
I would ike to remind you that shots work in a manufacturing environment, in other words, they usually have the user base that is same. It’s quite obvious that into the current set-up it’s impossible to operate tests in parallel. In the event that you activate two of those tests a few moments apart on various shots, then your 2nd test attempts to develop a profile on Badoo if the first has recently produced one, and it surely will inevitably fail:
How do we re re solve this nagging dilemma of ours? How do we ensure that the test constantly features a fresh FB individual?
At first I attempted to fix this dilemma the way that is simplest. We created a mysql table into that we imported a few manually-created FB users and marked their status as вЂavailableвЂ™. A user was taken by the test using this dining table, and changed their status to вЂbusyвЂ™. The test crashed, giving the relevant notification if there was no available user.
This method had a few drawbacks that are evident. Most importantly, if too numerous test circumstances had been triggered on top of that, there have been inadequate records available and there was clearly nowhere to obtain them from. Additionally, for a few explanation, the test might neglect to surrender the consumer at the conclusion (as an example if it absolutely was stopped by pressing вЂCtrl+CвЂ™). None for this had been valued on mornings whenever there clearly was lower than hour to get ahead of the launch due date.
We soon got sick and tired of unstable crashes and out-of-control statuses with FB records and started to search for a far better solutionвЂ¦
Facebook includes a API that is great lets you produce test users also to run them вЂ” developers.facebook.com/docs/graph-api. it really is organised pretty simply: you formulate the demand you will need then deliver it towards the FB host, after which https://hookupdates.net/nl/muslima-overzicht it the solution comes home in json structure.
You obtain a software id and key when you subscribe the job on FB (for more details see here вЂ” developers.facebook.com/docs/facebook-login/overview).
A real pool of Facebook users. Do it: letвЂ™s create users! 🙂
Having very very carefully examined graph-api and its own distinctive features, we put together the list that is following of problems: