Automating a request and response based app - ios

I am trying to automate a native iOS app, which involves a customer sending a request and a sales representative receives the request and responds.
Which tool should I use?
I want to run some UI specific test cases too.
Most automating tools don't support a request and response based app.
Please help.
Thanks

AFNetworking is probably the most used solution for response/request (REST api) applications. It is open source, actively maintained and can be found here.
Also it is pretty easy to implement and has well written documentation.

Related

Is it possible to develop a Jira plugin with RESTful capabilities for creating issues programatically?

I have developed a Django app which hosts a bunch of forms that collect information about issues and I want to use this data to create Jira issues programmatically.
I have a conceptual idea of how that can be achieved but my problem is that I am a complete software development newbie and also have never used Jira to this date, hence googling stuff is quite hard as I have an almost non-existent vocabulary in these regards and things get quite overwhelming really fast. I want to know if what I have in mind even makes sense before I delve deeper into documentations and figuring out how to implement stuff.
So I'm going to send POST requests from my Django app containing the issue information in JSON format. These POST requests would then be handled by some Java service which in turn uses the JRJC to create issues on Jira. In my head this implies that I have to develop a whole server (or use some kind of framework for that matter) for django to send its requests to and handle them. Would it be possible to write a plugin for JIRA that bypasses the need for such a server so I could just write the service for handling the requests and expose it on some URL based on the domain of my Jira instance?
I apologize if my question appears vague or ill-structured. Any attempts to shine light on my incompetence or pointing fingers in some direction will be greatly appreciated!
I assume that you're talking about Jira Server (hosted by you) rather than Jira Cloud (hosted by Atlassian).
A Jira plugin can expose a REST endpoint, so yes, you can write such a plugin and POST to an endpoint you define, which then uses the Jira Java API to create issues.
See https://developer.atlassian.com/server/framework/atlassian-sdk/rest-plugin-module/ for information on putting REST endpoints in your plugin.

How to connect from your iOS app to a backend server? how to read, modify and fetch data to backend server?

I am new in developing iOS applications. I like to learn communication between my app and a specific back-end server(which is written in ruby). I would like to learn how to read, fetch and modify data on the back-end server? I do not have any idea where I should start? I am very welcome if you could refer me to any online resource/tutorial for this topic.
First, you have to create an API in ruby. Here is a tutorial on how to do it: https://www.codeschool.com/courses/surviving-apis-with-rails.
After that, when you are sure that your API is working correctly, you can write a service for HTTP communication. You can do it by yourself, but in my opinion, a much better option would be using the third party for that. I prefer using AFNetworking: https://github.com/AFNetworking/AFNetworking.
You can also use Heroku. First you can create your API and make some tests then implement to your server.

ios native app talking to an API or direct database connections?

Folks,
Designing an ios application, and would like to confirm my strategy. There is a database (dynamo/mongo/etc) i am building up, which the app needs to make use of. Is it smart to front the database with an API, and have the ios app authenticate against the api.
This way the app makes calls to the api instead of directly to the database?
Would you suggest node.js be a good place to start crafting the web api with?
Thanks!
Yes, access the data via an API. Whether fancy authentication is needed, depends on what is stored in your database, and what your application is designed to do. Here is one resource (among millions) on API design: http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api
Also, here is a popular networking library for iOS: https://github.com/AFNetworking/AFNetworking
As for what technology to use, that too open ended and you will get 10 answers for every technology available. This should help though: https://softwareengineering.stackexchange.com/q/154519/44948

Calling Meteor from Native iOS Application

We are building an application that consists of a web app and a native iOS client. The web app is pretty straight forward with Meteor. But on the Native iOS App was wondering if someone can give us some pointers on the best practices for that app to call into meteor. I have seen that there is something like the collectionsapi api which exposes meteor collections over http, but am not sure how we would handle authentication for Native iOS clients if we used something like the collectionsapi or similar. Any pointers from some folks who have done this would be greatly appreciated.
Meteor's communication system is based on DDP (Distributed Data Protocol). You can access meteor's methods & make subscriptions to data which is probably the best way to go since you can get live data back too!
There is an objective-c client but its not been maintained : https://github.com/alansikora/objective-c_ddp-client
The ddp client was originally made prior to an official ddp specification (pre1). So you would have to adjust the client a bit to bring it up to date. Luckily its not too much work. The full DDP spec can be found here: https://github.com/meteor/meteor/blob/master/packages/livedata/DDP.md
Using DDP is a very attractive alternative to making a traditional REST request (POST,GET,PUT,etc). As the data on the wire is the same system meteor's client communicates to its server. So if you're able to make something on meteor work in a web browser you could pretty much replicate it on a native iOS client.
If you are still wondering about this, I've been working on a free, open source project that enables native ios clients to do meteor auth (SRP auth) and communicate via DDP. The project lives here: https://github.com/boundsj/ObjectiveDDP
There is an example app here: https://github.com/boundsj/ObjectiveDDP/tree/master/Example

iOS How to allow users to register an account / How to make a database of users

I am in the planning stages of building an App for iphone / ipad (yes, very early stages)
I am basically wondering how much work is involved in having a seperate user registration process for an app i.e. letting users register an account and use login using that account and use the app.
Will this involve constructing / coding an entirely new database or is there software available that automates this process?
thanks in advance
You could have a look at a service like StackMob.
This allows you to utilise server based services with no server-side implementation on your part.
These guys here: parse.com are doing a great job to facilitate developers the setup of a cloud database to do many tasks that are common in iOS apps.
In particular there is a section dedicated to user management (sign-up and sessions) that is well described here: Parse iOS guide
Finally the service offers some user interface help also, look here even if probably it is better to give to the UI some personalization by coding your own UI.
There are some implementations, but if your app is going to have custom code executed by server, you'd better make your own code.
Use a server side language (php, perl, ruby, python, java) to do the registration.
You'll probably need a REST service and/or json if you are going for easy peasy stuff (if you are to web apps programming). Otherwise, you'll need to do xml parsing and other stuffs. Use asi-http for the interactions between server and the app, or if you are using ios5.x it has already a json parsing implementation.

Resources