I am working API testing where expected (source) and actual (target) both are apis. So I need to hit both apis dynamically with an account number and have to assert both expected and actual.
Feature: un ordered array assertions
Scenario :
* url 'https://source.org/anything'
* path id
* method get
* def expected = expecteResponse.empDetails
* url 'https://actual.org/anything'
* path id
* method get
* def actual = actualResponse.emps
* match expected == actual
- Here is my problem is expected [100,30,50], actual [50,100,30]. How can I assert them? And also, I need to validate string vs string (source = [sea,bus,air], target[bus,air,sea]) or integer vs float (Source = [10,1,20], target = [20.0,10.0,1.0]) or float vs integer (source =[20.0,10.0,1.0] target = [10,1,20]) or integer vs integer(source = [10,0,1] target = [0,10,1]. This my current.
But, it would be great if you answered for following questions (This top most problem for me to choose a framework to compare/validate apis which developed extract to api or api to api by using strapi technology)
Mostly my tickets like source and target - content-as-a-service(CaaS) both are apis' need to validate regard less data type or array. Need to write re-usable functions (I am already using bearer tokens, but need to implement with other).
same source and target validations but incorporate so many logics/expressions from source to target. can I adapt Karate framework for my testing?