Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Lecture 3— Application Programming Interface

Lecture 3— Application Programming Interface

"Software Testing for Complex Intelligent Systems and Autonomous Vehicles" online course.

The lecture is available via the link: https://youtu.be/Ka6JNG12Qn4
--
To learn more about Exactpro, visit our website https://exactpro.com/

Follow us on
LinkedIn https://www.linkedin.com/company/exactpro-systems-llc
Twitter https://twitter.com/exactpro
Facebook https://www.facebook.com/exactpro/
Instagram https://www.instagram.com/exactpro/
Vkontakte https://vk.com/exactpro_llc

Subscribe to Exactpro YouTube channel https://www.youtube.com/c/exactprosystems

5206c19df417b8876825b5561344c1a0?s=128

Exactpro
PRO

March 12, 2021
Tweet

Transcript

  1. 1 Build Software to Test Software exactpro.com Lecture 3 Application

    Programming Interface Software Testing for Complex Intelligent Systems and Autonomous Vehicles Online Course
  2. 2 Build Software to Test Software exactpro.com Lecture Overview What

    is API: definition, API vs protocol, API types and their place under the sun API examples in complex financial systems API examples that will be used at the course seminars
  3. 3 Build Software to Test Software exactpro.com 3 Types of

    Systems
  4. 4 Build Software to Test Software exactpro.com Useful Links https://en.wikipedia.org/wiki/API

  5. 5 Build Software to Test Software exactpro.com Useful Links https://youtu.be/GZvSYJDk-us

  6. 6 Build Software to Test Software exactpro.com Useful Links https://www.youtube.com/playlist?list=PLcgRuP1JhcBP8Kh0MC53GH_pxqfOhTVLa

  7. 7 Build Software to Test Software exactpro.com Useful Links https://www.altexsoft.com/blog/engineering/what-is-api-definition-types-specifications-documentation/

  8. 8 Build Software to Test Software exactpro.com https://rapidapi.com/blog/types-of-apis/ Useful Links

  9. 9 Build Software to Test Software exactpro.com What is an

    Interface
  10. 10 Build Software to Test Software exactpro.com What is API

    API is an interface allowing two independent software components to exchange information. API plays the role of an intermediary between internal and external software functions.
  11. 11 Build Software to Test Software exactpro.com Web Application Structure

    Web Servers Static Content Browser DOM model HTTP(S) Request HTTP(S) Response Internet CSS HTML Javascript Everything a user sees in the browser is a mix of HTML, CSS, and JavaScript Browser sends requests to the server, receives responses and visualizes them as a page The back-end server-side scripts process the request, pull what they need from the database and application servers and then send it back 1 2
  12. 12 Build Software to Test Software exactpro.com Application Servers Data

    Web Servers Static Content Browser DOM model HTTP(S) Request HTTP(S) Response Internet CSS HTML Javascript Web Application Structure The back-end server-side scripts process the request, pull what they need from the database and application servers and then send it back 2 Everything a user sees in the browser is a mix of HTML, CSS, and JavaScript Browser sends requests to the server, receives responses and visualizes them as a page 1
  13. 13 Build Software to Test Software exactpro.com Application Servers Data

    Web Servers Static Content Browser DOM model HTTP(S) Request HTTP(S) Response Internet CSS HTML Javascript Web Application Structure Browser sends requests to the server, receives responses and visualizes them as a page The back-end server-side scripts process the request, pull what they need from the database and application servers and then send it back 1 Client-side scripts Run in the browser and process information without sending requests to the server 3 2 Everything a user sees in the browser is a mix of HTML, CSS, and JavaScript
  14. 14 Build Software to Test Software exactpro.com Application Servers Data

    Web Servers Static Content Browser DOM model HTTP(S) Request HTTP(S) Response Internet CSS HTML Javascript Web Application Structure Everything a user sees in the browser is a mix of HTML, CSS, and JavaScript Browser sends requests to the server, receives responses and visualizes them as a page The back-end server-side scripts process the request, pull what they need from the database and application servers and then send it back 1 Client-side scripts Run in the browser and process information without sending requests to the server 3 AJAX allows to create asynchronous web interactions without interfering with the display and the behaviour of the existing page 4 2
  15. 15 Build Software to Test Software exactpro.com Application Servers Data

    Web Servers Static Content Browser DOM model HTTP(S) Request HTTP(S) Response Websocket Internet CSS HTML Javascript Web Application Structure Browser sends requests to the server, receives responses and visualizes them as a page The back-end server-side scripts process the request, pull what they need from the database and application servers and then send it back 1 Client-side scripts Run in the browser and process information without sending requests to the server 3 AJAX allows to create asynchronous web interactions without interfering with the display and the behaviour of the existing page 4 2 Everything a user sees in the browser is a mix of HTML, CSS, and JavaScript WebSocket enables interaction between a web browser and a web server with lower overhead than half-duplex alternatives such as HTTP polling 5
  16. 16 Build Software to Test Software exactpro.com Application Servers Data

    Web Servers Static Content Browser DOM model HTTP(S) Request HTTP(S) Response Websocket Internet CSS HTML Javascript Web Application Structure Browser sends requests to the server, receives responses and visualizes them as a page The back-end server-side scripts process the request, pull what they need from the database and application servers and then send it back 1 Client-side scripts Run in the browser and process information without sending requests to the server 3 AJAX allows to create asynchronous web interactions without interfering with the display and the behaviour of the existing page 4 2 Everything a user sees in the browser is a mix of HTML, CSS, and JavaScript WebSocket enables interaction between a web browser and a web server with lower overhead than half-duplex alternatives such as HTTP polling 5
  17. 17 Build Software to Test Software exactpro.com CSS HTML Javascript

    Application Servers Data Web Servers Static Content Browser DOM model HTTP(S) Request HTTP(S) Response Websocket Internet Web Application Structure Browser sends requests to the server, receives responses and visualizes them as a page The back-end server-side scripts process the request, pull what they need from the database and application servers and then send it back 1 Client-side scripts Run in the browser and process information without sending requests to the server 3 AJAX allows to create asynchronous web interactions without interfering with the display and the behaviour of the existing page 4 2 Responsive front-end design allows a site to adapt to user’s device Everything a user sees in the browser is a mix of HTML, CSS, and JavaScript WebSocket enables interaction between a web browser and a web server with lower overhead than half-duplex alternatives such as HTTP polling 5
  18. 18 Build Software to Test Software exactpro.com WebSocket enables interaction

    between a web browser and a web server with lower overhead than half-duplex alternatives such as HTTP polling Responsive front-end design allows a site to adapt to user’s device Everything a user sees in the browser is a mix of HTML, CSS, and JavaScript 5 CSS HTML Javascript Application Servers Data Web Servers Static Content Browser DOM model HTTP(S) Request HTTP(S) Response Websocket Internet Web applications are always multi-user applications, and many of them work under heavy load and are subject to concurrency access 6 Web Application Structure Browser sends requests to the server, receives responses and visualizes them as a page The back-end server-side scripts process the request, pull what they need from the database and application servers and then send it back 1 Client-side scripts Run in the browser and process information without sending requests to the server 3 AJAX allows to create asynchronous web interactions without interfering with the display and the behaviour of the existing page 4 2
  19. 19 Build Software to Test Software exactpro.com A Human from

    the Point of View of an App
  20. 20 Build Software to Test Software exactpro.com A Human from

    the Point of View of an App
  21. 21 Build Software to Test Software exactpro.com Human → Driverless

    Vehicle
  22. 22 Build Software to Test Software exactpro.com A Human from

    the Point of View of an App
  23. 23 Build Software to Test Software exactpro.com Human → Driverless

    Vehicle
  24. 24 Build Software to Test Software exactpro.com API around us:

    Looking to the Future https://www.capgemini.com/research/world-quality-report-wqr-20-21/
  25. 25 Build Software to Test Software exactpro.com Human-Machine Interaction Interface

  26. 26 Build Software to Test Software exactpro.com Human-Machine Interaction Interface

  27. 27 Build Software to Test Software exactpro.com API vs. Protocol

    Protocol: API: Interaction rules, language A way of communicating a message
  28. 28 Build Software to Test Software exactpro.com Protocol - API

    - Protocol Protocol Protocol API TCP/IP FIX Messages FIX Protocol
  29. 29 Build Software to Test Software exactpro.com PPP: Processes, Platforms,

    People
  30. 30 Build Software to Test Software exactpro.com PPP: Processes, Platforms,

    People https://zero-outage.com/
  31. 31 Build Software to Test Software exactpro.com API Types: Private,

    Partner, Public https://www.altexsoft.com/blog/engineering/what-is-api-definition-types-specifications-documentation/
  32. 32 Build Software to Test Software exactpro.com API types: Library,

    Code, Data </>
  33. 33 Build Software to Test Software exactpro.com Example: NASDAQ –

    GENIUM OMNET API (Library) https://www.nasdaq.com/solutions/genium-inet-protocol-specific ations
  34. 34 Build Software to Test Software exactpro.com Example: NASDAQ –

    FIX Protocol (Data) https://www.nasdaq.com/docs/2020/10/01/GeniumFIX_ProtSpec_ Nordic_v223.pdf https://www.fixtrading.org/
  35. 35 Build Software to Test Software exactpro.com Example: Bitcoin (Code)

    </>
  36. 36 Build Software to Test Software exactpro.com Question Python-based API

    of the LGSVL Simulator – what type? </>
  37. 37 Build Software to Test Software exactpro.com FIX Trading Community

    – Monitoring, Onboarding and Software Testing Group https://www.fixtrading.org/groups/mostwg/
  38. 38 Build Software to Test Software exactpro.com API Examples https://rapidapi.com/blog/types-of-apis/

  39. 39 Build Software to Test Software exactpro.com API Examples https://docs.corda.net/docs/corda-os/4.7/api-flows.html

    https://rapidapi.com/blog/top-anime-manga-apis/ https://rapidapi.com/blog/best-beer-wine-alcohol-api/ 7 APIs Everyone in the Anime/Manga Industry Should Be Using Top 8+ Beer, Wine, & Alcohol APIs for Developers [2021] API: Flows|Corda
  40. 40 Build Software to Test Software exactpro.com Documenting API “APIs

    should be self-documenting: It should rarely require documentation to read code written to a good API. In fact, it should rarely require documentation to write it.” https://www.infoq.com/articles/API-Design-Joshua-Bloch/ https://www.youtube.com/watch?v=aAb7hSCtvGw “APIs should be easy to use and hard to misuse. It should be easy to do simple things; possible to do complex things; and impossible, or at least difficult, to do wrong things.”
  41. 41 Build Software to Test Software exactpro.com API Specs •

    https://en.wikipedia.org/wiki/API#Documentation • An example of a human-readable specification: https://connect2.euronext.com/sites/default/files/it-docum entation/Euronext%20Markets%20-%20Optiq%20OEG%20 Client%20Specifications%20-%20FIX%205.0%20Interface%2 0-%20v2.0.0.pdf • An example of a machine-readable specification: https://www.fixtrading.org/standards/fix-orchestra/, https://youtu.be/eOIA_7bRQyI
  42. 42 Build Software to Test Software exactpro.com Interface Stability https://developer.gnome.org/programming-guidelines/stable/api-stability.html.en

  43. 43 Build Software to Test Software exactpro.com Plugins

  44. 44 Build Software to Test Software exactpro.com LGSVL Simulator: A

    High Fidelity Simulator for Autonomous Driving https://arxiv.org/pdf/2005.03778.pdf
  45. 45 Build Software to Test Software exactpro.com Conferences 2021 IEEE

    AI Testing Conference. Paper submission until 30 April. http://ieeeaitests.com/ TMPA - International Conference on Software Testing, Machine Learning and Complex Process Analysis https://tmpaconf.org/
  46. 46 Build Software to Test Software exactpro.com LGSVL Simulator: A

    High Fidelity Simulator for Autonomous Driving https://arxiv.org/pdf/2005.03778.pdf
  47. 47 Build Software to Test Software exactpro.com LGSVL Simulator and

    its APIs Real Road Testing Simulation Python API Analytics&Visualization Logs Logs AD Stack Simulator Plugins Digital Twin Map (or Procedurally Generated Map) (Ground Truth Data) (Sensor & Tracking Data) Vehicle & Sensors Vehicle & Sensor Model Environment Creation Bridge Real-World User modules Third Party Collaboration LGSVL Simulator Test Scenario Scenario Player 3rd party Test Scenario 3rd party ScenarioPlayer HD Map
  48. 48 Build Software to Test Software exactpro.com Bridges for Connecting

    to Driverless Vehicles
  49. 49 Build Software to Test Software exactpro.com Real Road Testing

    Simulation Python API Analytics & Visualization Logs Logs AD Stack Simulator Plugins Digital Twin Map (or Procedurally Generated Map) (Ground Truth Data) (Sensor & Tracking Data) Vehicle & Sensors Vehicle & Sensor Model Environment Creation Bridge Real-World User modules Third Party Collaboration LGSVL Simulator Test Scenario Scenario Player 3rd party Test Scenario 3rd party Scenario Player HD Map LGSVL Simulator and its APIs
  50. 50 Build Software to Test Software exactpro.com https://www.lgsvlsimulator.com/docs/python-api/ LGSVL Simulator

    and its APIs
  51. 51 Build Software to Test Software exactpro.com https://www.lgsvlsimulator.com/docs/python-api/ LGSVL Simulator

    and its APIs
  52. 52 Build Software to Test Software exactpro.com https://github.com/lgsvl/PythonAPI LGSVL Simulator

    and its APIs
  53. 53 Build Software to Test Software exactpro.com https://github.com/lgsvl/PythonAPI/blob/master/quickstart/01-connecting-to-simulator.py LGSVL Simulator

    and its APIs
  54. 54 Build Software to Test Software exactpro.com Connection via port

    8181
  55. 55 Build Software to Test Software exactpro.com Simulator’s response

  56. 56 Build Software to Test Software exactpro.com Request

  57. 57 Build Software to Test Software exactpro.com Response

  58. 58 Build Software to Test Software exactpro.com Callbacks Python API

    Simulator Simulation In running Python code waits for response Other actions Connect websocket Create vehicle Create pedestrian sim.run() Time limit or callback (ex collision) Create “Simulator”
  59. 59 Build Software to Test Software exactpro.com Thank you! Join

    our Telegram chat, meet your peers, ask questions and get new software testing skills with Exactpro! Subscribe to our YouTube channel to see all the new videos!