Testing of integration of a web application with social media

Natalia, TechLead of the Noveo QA department, is sharing her experience of implementing a quite tricky functionality - integration of a web application with social media.

Many people don’t feel like completing another field on a new website when logging in. Single Sign-On with popular social networks often comes in handy here: Facebook Google, Instagram. Isn’t it wonderful to click one button and you have everything filled out for you! It only works so when you use an already implemented feature but what is hidden behind a perfectly running functionality?

One of our group of projects had this main feature of posting content to multiple social networks and also logging in through social networks. This article may shed light on what is worth paying attention to if you encounter a similar task.

Authentication

Let’s start at the very beginning - authentication which is there on any application and seems to cause not trouble at all to a tester even with almost no experience. However, it is not that simple.

If you have ever had to test SSO authentication, you know that when getting user data from an external service the account in our database gets connected to the account ID on the external server. Here comes a hidden danger though: what if your email has already been registered, but in a usual way; or your social network account is bound to a different email address in the database. You may want not to allow the user to log in for safety reasons in that case. However, what if you you changed your email in a social network after you had signed in to our platform? Such cases have to be discussed with a customer beforehand.

A social network may also not be sending all the needed data to our database, for example, a mandatory surname or a birth date. So remember to ensure that all the needed fields for the authentication are being filled in or offer the user to fill them in manually as a second step.

Content

The next task - to post the content which also comes in two types: sharing a link to a page or creating a unique post.

The first one is the most likely type of task and it doesn’t usually cause any trouble. We set the meta tags, choose what the upcoming link has to display as a preview and then check.

In our case we had been given the task to create some unique content and share it to social media and that’s when a lot of unexpected happened.

First of all, you also have to connect the user account to the social media account. Surely, there is no need to sign in a new user but they still check if the ID is not taken and it is allowed to make changes.

Second of all, how will the posting happen? There are several options depending on the social network. Facebook allows to post only through their window. It means all the data completed by the user have to be transferred to the opening window. However, the server can do it for Twitter and LinkedIn: it’s enough to complete the data and send the needed API request to our server - it will do the job of posting by itself. In any case you should make sure the data are posted correctly.

In this case you may find it useful to apply boundary testing techniques and equivalent partition. It should be ensured how the posted mediafiles of different files are displayed, and also different text sizes and symbols must be taken into account (Special regards to diacritics in French! >_< ). If it is possible to add emoji, then make sure they are correctly decoded and are not placed at one location in the post. Otherwise you may have to prove you are not a robot. Noveo integration with social networks testing project We may have covered it all, but no. There is a snag: during authorization and posting there are modal windows being opened. Since the Internet is quite a bit of a danger zone, some browsers often block them. So while testing don't forget to call back the permission from the website not to miss this bug.

If the window opens, do not rush to pop some champagne. There is another sore point - after authorizing or clicking on the ‘post’ button it has to redirect back to our site and our customer has to process the action but this doesn’t happen for some reason. Moreover if everything is fine on Windows, it doesn’t mean it will work on Mac. And if it is fine on Mac, iPhone will have some trouble. If Chrome has no problem, Firefox will definitely block the authorization window. Along with this Facebook may work, but Twitter - hardly. Most likely the developer has no idea how to fix that :( Plus if you need IE support prepare for the worst)

We bump into these bugs during each new website and a social network integration despite the fact it is seemingly the same task.

Moreover when testing in development mode each account has to be added as a developer account but their number is limited - so remember to pass your test account to the developer. You are not going to have too many accounts so make sure you can test all the cases especially if there is no access to the database.

Finally, you have tested all the possible cases and your project is fine! However, if the project is a lengthy one you may have to maintain the functionality further on so don’t forget about regression testing. Social network API and browser functionality are quite often updated which is why, in our experience, the aforementioned problems occur.

If the performance is stable, your team has undoubtedly done great job and can be proud of that. Let your heart pain be revealed in a private post or, even better, delete it after testing. So you can get a head start on new tasks with a clear conscience (and a history of posts). Noveo social networks integration testing project PS: My favorite network for publishing is Instagram. They have removed the possibility to make publications from third-party web applications, and all that is required of our functionality is to make a publication in their application, and manually fill in the name in Instagram and post the link in our application. Just two text fields, what can be easier? :)