Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Objective-C or Swift api


#1

Are there plans to make api bindings for Objective-C or Swift since Apple made their UITest framework in Xcode 7?


#2

Hi Patrick,

Thanks for your posting! There are currently no direct plans for this but TestRail’s API is a very easy to use and generic HTTP API so you can also use the HTTP APIs from Apple to talk to TestRail’s API:

https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/WorkingWithHTTPAndHTTPSRequests/WorkingWithHTTPAndHTTPSRequests.html

Our documentation for accessing the API via raw HTTP/curl can be found here:

http://docs.gurock.com/testrail-api2/accessing

I hope this helps!

Cheers,
Tobias


#3

Thanks! I will make a template and share it for others that may be interested.


#4

Hi Patrick,

Thanks for your reply! Yes, that would be great and I look forward to an example. I’m also happy to help in case any questions come up.

Cheers,
Tobias


#5

This approach for using AFNetworking is good for XC Unit Tests because you can link the binary to the test target and use #import AFNetworking.h

My understanding is this can not be used in a UITestClass.swift file and make network calls. This would mean we’re unable to pass results to TestRail’s API from a UI XCtests. Unless I’m missing something please help me understand how to import AFNetworking into a UI test class and pass automated test results from UI XCTests.


#6

Hi Jeremiah,

Thanks for your posting. I believe there are already some usable Objective-C/Swift libraries available and here’s one I found for Objective-C/iOS:

Cheers,
Tobias


#7

Hello,
I’m struggling to find a library for Swift (I know nothing about Object-C, so I’d prefer not to go that way). Does anyone know where I could find one?

I’ve started to write tests for our iOS app, and it would be really good to be able to see the results in TestRail.

Thanks!
Ania