0% found this document useful (0 votes)
30 views3 pages

2 - Api

Uploaded by

khaled2255477
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views3 pages

2 - Api

Uploaded by

khaled2255477
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1- what is APIs (application programming interface) and in which layer

is applied ?
APIs is a connection point between all layers of any application
‫ بالترتيب‬Layers ‫ال‬
Presentation Layer(GUI) -
Application (logic & Code) Layer -
DB Layer -
request from ‫ وهي انها بتستقبل‬application layer ‫ بتقوم بدورها في مرحله ال‬APIs ‫ال‬
‫ وبتعمل عليه العمليات المطلوبه بعد ما بتتأكد من المعلومات اللي جايه من‬presentation layer
header & request body ‫الريكوست زي‬

‫ و علي حسب ال‬../ get /post /put( ‫ بتاعتها‬method ‫ دي ال‬APIs ‫هيبقي فاضل اننا نعرف ال‬
‫ او انها تضيف داتا ف‬get ‫ كانت‬method ‫ هتاخد اكشن انها تجيب داتا من الداتابيز مثال لو ال‬method
‫ وهكذا وبعد ما تنفذ اللي كان مطلوب ف الريكوست هترجع ب‬post ‫ كانت‬method ‫الداتا بيز لو ال‬
‫ عشان تقول ايه اللي حصل معاها اثناء تنفيذ‬APIs ‫ اللي هو عباره عن ريبورت بتطلعه ال‬response
‫ برده ودا اللي من خالله هعرف اذا كانت العمليه‬header &body ‫الريكوست الفالني ودا بيكون ليه‬
response code & response message ‫ من خالل ال‬done or not ‫المطلوبه‬

2- what is difference between web services & APIs ?


web service is APIs via internet
‫ بس متوصله باالنترنت عشان كدا بيتقال‬APIs ‫ هي اصال‬web service ‫يعني ال‬
web services ‫ هي‬APIs ‫ لكن مش كل ال‬APIs ‫ هي‬web services ‫ان كل ال‬

3-what are the most common used Protocols in APIs ?


SOAP ->Simple Object Access Protocol
REST -> Representational State Transfer

4-REST OR SOAP is better ?


‫ هي االحدث واالسهل واالكثر استخداما حاليا‬rest
stateless ‫ فيها ميزه انها‬rest
‫ بتاعت السيستم يعني لو فيه مشكله ف السيرفر برده هترد‬status ‫بمعني انها مش معتمده علي ال‬
SOAP ‫عليا ب ايرور مسدج افهم منها ان فيه مشكله و دا مكنش بيحصل ف ال‬
‫ كان بيشتغل ع الداتا الحقيقه نفسها‬SOAP ‫ لكن‬row ‫ بتشتغل علي نسخه من ال‬REST ‫الن ال‬

5-what are the most common used tools in APIs


Postman / SoapUI /Katalon

6- what are types of requests in APIs ?

POST to add data


get to retrieve data
Put Update data – ‫الزم ادخل الداتا كلها حتي لو هعدل في خصائص معينه‬
patch ‫ببعت الداتا اللي هعدلها فقط‬
Delete To remove data

7- what are status codes ?


200 success
404 not found
500 server error
400 bad request
401 unauthorized
403 forbidden

8- what is difference between Json or xml based on which type of api


you need to test (soap/rest)?
) ‫ (مستخدمه اكتر‬json ‫ بتتكتب باستخدام‬rest
SOAP - > XML

9-what is the meaning of collection ?


Postman Collections are a group of saved requests. Every request you send in
Postman appears under specific collection
) ‫ بتاعتي‬requests ‫(طريقه تنظيميه بقسم بيها ال‬

10- what is difference between global /environment /session variables


global -> can be used in any request or collection
‫ بتاعته بس‬environment ‫> بيبقي متشاف ع مستوي ال‬- environment
development ( ‫ لتنظيمه زي مثال لو عندي‬environment ‫و بنستخدمه لما نقسم الشغل ع اكثر من‬
envir / testing / production
session -> used to store information that you don't want to share it with others (
username /password )
https://www.youtube.com/watch?v=0hJnCA6XGQ4

11-success messages/failure messages


‫ بيرجع‬200 ‫ عشان نفهمه اكتر زي مثال‬status code ‫ مع ال‬response ‫المسدجات اللي بترجع ف ال‬
‫ وهكذا‬NOT FOUND ‫ بيرجع معاها‬404 ‫ و‬OK ‫معاها‬

12-what are advantages & disadvantages for postman ??


adv -> user friendly / accessible
disadvan -> limited testing area (is suitable for rest not SOAPUI )
‫وان التيسترز مش بيعرفوا يستخدموا السكريبتات اللي كتبوها ف مشروع معين يضيفوها ف مشروع‬
‫تاني ف الزم يكتبوها من ال‬

13 ‫ ايه التيست كيسز اللي ممكن افكر فيها وانا شغال‬APIs ?


1. Check Status code
2. Check Happy scenario for the request [valid data]
3. Send the request with empty body
4. Send the request with an Invalid data
5. Check the Errors that must be displayed in each case
6. check the Response body
7. Send the request without/ with auth token
8. Check data types that should be sent with the request

14-what is swagger ?
swagger is an APIs documentation
‫ عشان نعرف نستخدمها و بيتكاب فيها‬instructions ‫ بتاعت المشروع كل ال‬APIs ‫بيكون فيها كل ال‬
‫ حصلت واحنا شغالين ف المشروع‬updates ‫اي‬
15- path parameters , query parameters ?
‫ الثابته اللي ببعت ليها قيمه معينه كل ريكوست يعني‬parameters ‫ اللي هي ال‬query parameters
‫ابعتلي ال‬
id =3
‫ روح هاته من ال‬id ‫ يعني لو عاوز ال‬dynamic parameters ‫ هي ال‬path parameters
‫ مثال‬product ID ‫ اللي اسمه‬variable
...https://www.youtube.com/watch?app=desktop&v=3je7xBwipDg

16‫ايه هو‬- mock server ?


...https://www.youtube.com/watch?app=desktop&v=CLC9IPyeHqM

17-‫ ايه الفرق بين‬wsdl ‫ وبين‬UDDI ?


web services ‫ بتوع ال‬components ‫هم االتنين الل‬
data types & description ‫ ودي بتوصف ال‬wsdl (web service description language )
web services ‫ & بتاعت ال‬attributes
UDDI (universal description ,discovery and integration )
‫ يقدروا‬clients ‫ عشان ال‬web services ‫ اللي فيه ال‬online directory (repository ) ‫هي ال‬
‫ معينه‬queries‫يعملوا عليها سيرش و‬

18‫ايه الفرق بين‬- postman , Newman ?


‫ بتخليك ترن ال‬command line collection runner for postman ‫ هي عباره عن‬Newman
command line ‫ بتاعك من خالل‬collection
https://m.facebook.com/groups/ISTQBEgypt/permalink/
/10159292825858823

19-‫ يه انواع‬authorization ?
no auth /APIKey /basic auth ,...
https://learning.postman.com/.../sendin.../authorization/...

20‫ايه الفرق بين‬- header ,body ,cookies ?


https://www.youtube.com/watch?v=nhlJf_19vNg&feature=share...

21- ‫ ازاي تعرف المشكله‬frontend & backend


website ‫ ل‬test ‫لو بتعمل‬
network tab ‫ وتفتح ال‬browser ‫ لل‬inspect ‫الحل االسرع انك تعمل‬
website ‫ بتعمله من ال‬request ‫هنا بيظهر كل‬
‫ بتاعه‬response ‫وال‬
‫ هنا‬response ‫ بشوف ال‬UI ‫ وظهرت مشكله في ال‬login ‫فبشكل سريع لو بعمل‬
front ‫ راجع بدون مشاكل يبقى المشكله‬response ‫لو ال‬
Postman ‫ زي‬API client ‫ تاني في أي‬request ‫ بتروح تجرب نفس ال‬error ‫لو راجع ب‬
‫ بيبعت بيها ال‬front ‫ نفسه ولكن في الطريقه اللي ال‬API ‫عشان ممكن تكون المشكله مش‬
‫ والداتا‬request

You might also like