SlideShare a Scribd company logo
INTEGRATION TEST
FRAMEWORK
FOR DSP
Ilya Medvedev
Supply-side platform
Demand-side platform
Demand-side platform
Demand-side platform
Supply-side platform Demand-side platform
Supply-side platform
Supply-side platform
Supply-side platform Demand-side platform
REQUEST
RESPONSE
Test framework Demand-side platform
REQUEST
RESPONSE
Test
1. Create request
2. Send request from AppNexus
3. Test response
cerateRequest() {
request = new Request();
}
sendRequest(String sspName) {
requester = getRequester(sspName);
response = requester.send(request);
}
testResponse() {
If (response.isNoBid()) {
throw new
NoBidResponseException(response);
}
}
Test
1. Create request with American IP address
2. Send request from AppNexus
3. Test response
cerateRequest() {
request = new Request();
}
sendRequest(String sspName) {
requester = getRequester(sspName);
response = requester.send(request);
}
testResponse() {
If (response.isNoBid()) {
throw new
NoBidResponseException(response);
}
}
cerateRequest() {
request = new Request();
}
cerateRequestWithIpAddress(String country) {
request = new Request()
.setIP(geoIp.getIp(country));
}
sendRequest(String sspName) {
requester = getRequester(sspName);
response = requester.send(request);
}
testResponse() {
If (response.isNoBid()) {
throw new NoBidResponseException(response);
}
}
Test
1. Create request with Verizon mobile carrier
2. Send request from AppNexus
3. Test response
cerateRequest() {
request = new Request();
}
cerateRequestWithIpAddress(String country) {
request = new Request()
.setIP(geoIp.getIp(country));
}
sendRequest(String sspName) {
requester = getRequester(sspName);
response = requester.send(request);
}
testResponse() {
If (response.isNoBid()) {
throw new NoBidResponseException(response);
}
}
cerateRequest() {
request = new Request();
}
cerateRequestWithIpAddress(String country) {
request = new Request()
.setIP(geoIp.getIp(country));
}
cerateRequestWithMobileCarrier(String carrier)) {
request = new Request()
.setMobileCarrier(carrier);
}
sendRequest(String sspName) {
requester = getRequester(sspName);
response = requester.send(request);
}
testResponse() {
If (response.isNoBid()) {
throw new NoBidResponseException(response);
}
}
cerateRequest() {
request = new Request();
}
sendRequest(String sspName) {
requester =
getRequester(sspName);
response =
requester.send(request);
}
testResponse() {
If (response.isNoBid()) {
throw new
NoBidResponseException(response);
}
}
cerateRequestWithIpAddress(String
country) {
request = new Request()
.setIP(geoIp.getIp(country));
}
sendRequest(String sspName) {
requester =
getRequester(sspName);
response =
requester.send(request);
}
testResponse() {
If (response.isNoBid()) {
throw new
NoBidResponseException(response);
}
}
cerateRequestWithMobileCarrier(String
carrier)) {
request = new Request()
.setMobileCarrier(carrier);
}
sendRequest(String sspName) {
requester =
getRequester(sspName);
response =
requester.send(request);
}
testResponse() {
If (response.isNoBid()) {
throw new
NoBidResponseException(response);
}
}
Test
1. Create request
2. Send request from AppNexus
3. Test response
class RequestCreator {
Context context;
RequestCreator(Context context) {
this.context = context;
}
}
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>${dependency.cucmber.version}</version>
</dependency>
class RequestCreator {
Context context;
RequestCreator(Context context) {
this.context = context;
}
}
cerateRequest() {
request = new Request();
context.setValue(Context.REQUEST, request);
}
cerateRequestWithIpAddress(String country) {
request = new Request()
.setIP(geoIp.getIp(country));
context.setValue(Context.REQUEST, request);
}
cerateRequestWithMobileCarrier(String carrier)) {
request = new Request()
.setMobileCarrier(carrier);
context.setValue(Context.REQUEST, request);
}
class RequestSender {
Context context;
RequestSender(Context context) {
this.context = context;
}
}
sendRequest(String sspName) {
request = context.getValue(Context.REQUEST);
requester = getRequester(sspName);
response = requester.send(request);
context.setValue(Context.RESPONSE, response);
}
class RequestTester {
Context context;
RequestTester(Context context) {
this.context = context;
}
}
testResponse() {
response = context.getValue(Context.RESPONSE);
If (response.isNoBid()) {
throw new
NoBidResponseException(response);
}
}
public class Context {
public static final Context<Request> REQUEST = new Context<>();
public static final Context<Response> RESPONSE = new Context<>();
private final Map<Context, Object> context = new HashMap<>();
public <Value> Context setValue(final Context<Value> context, Value
value) {
context.put(context, value);
return this;
}
public <Value> Value getValue(final Context<Value> context) {
return (Value) context.get(context)
}
cerateRequest() {
request = new Request();
context.setValue(Context.REQUEST, request);
}
cerateRequestWithIpAddress(String country) {
request = new Request()
.setIP(geoIp.getIp(country));
context.setValue(Context.REQUEST, request);
}
cerateRequestWithMobileCarrier(String carrier)) {
request = new Request()
.setMobileCarrier(carrier);
context.setValue(Context.REQUEST, request);
}
sendRequest(String sspName) {
request = context.getValue(Context.REQUEST);
requester = getRequester(sspName);
response = requester.send(request);
context.setValue(Context.RESPONSE, response);
}
testResponse() {
response = context.getValue(Context.RESPONSE);
If (response.isNoBid()) {
throw new
NoBidResponseException(response);
}
}
public class SharedBrowser {
private static final Browser BROWSER = new Browser();
static {
final ShutdownHook shutdownHook = new
ShutdownHook(BROWSER);
Runtime.getRuntime()
.addShutdownHook(shutdownHook);
}
}
public class ShutdownHook extends Thread {
private final Closeable closeable;
ShutdownHook(final Closeable closeable) {
this.closeable = closeable;
}
void run() {
closeable.close();
}
}
Questions?

More Related Content

What's hot

Dpilot Source Code With ScreenShots
Dpilot Source Code With ScreenShots Dpilot Source Code With ScreenShots
Dpilot Source Code With ScreenShots
DeepAnshu Sharma
 
Source Code for Dpilot
Source Code for Dpilot Source Code for Dpilot
Source Code for Dpilot
Nidhi Chauhan
 
End to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux SagaEnd to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux Saga
Babacar NIANG
 
Using Change Streams to Keep Up with Your Data
Using Change Streams to Keep Up with Your DataUsing Change Streams to Keep Up with Your Data
Using Change Streams to Keep Up with Your Data
Evan Rodd
 
Unit testing powershell
Unit testing powershellUnit testing powershell
Unit testing powershellMatt Wrock
 
Akka.NET streams and reactive streams
Akka.NET streams and reactive streamsAkka.NET streams and reactive streams
Akka.NET streams and reactive streams
Bartosz Sypytkowski
 
How to practice TDD without shooting yourself in the foot
How to practice TDD without shooting yourself in the footHow to practice TDD without shooting yourself in the foot
How to practice TDD without shooting yourself in the foot
Dennis Doomen
 
Behind modern concurrency primitives
Behind modern concurrency primitivesBehind modern concurrency primitives
Behind modern concurrency primitives
Bartosz Sypytkowski
 
Understanding reactive programming with microsoft reactive extensions
Understanding reactive programming  with microsoft reactive extensionsUnderstanding reactive programming  with microsoft reactive extensions
Understanding reactive programming with microsoft reactive extensions
Oleksandr Zhevzhyk
 
201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harian201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harian
KhairunnisaPekanbaru
 
Fia fabila
Fia fabilaFia fabila
Fia fabila
fiafabila
 
Agile Swift
Agile SwiftAgile Swift
Agile Swift
Godfrey Nolan
 
Tugas 2
Tugas 2Tugas 2
Tugas 2
Novi_Wahyuni
 
Async JavaScript in ES7
Async JavaScript in ES7Async JavaScript in ES7
Async JavaScript in ES7
Mike North
 
The Ring programming language version 1.5.2 book - Part 39 of 181
The Ring programming language version 1.5.2 book - Part 39 of 181The Ring programming language version 1.5.2 book - Part 39 of 181
The Ring programming language version 1.5.2 book - Part 39 of 181
Mahmoud Samir Fayed
 

What's hot (18)

Dpilot Source Code With ScreenShots
Dpilot Source Code With ScreenShots Dpilot Source Code With ScreenShots
Dpilot Source Code With ScreenShots
 
Source Code for Dpilot
Source Code for Dpilot Source Code for Dpilot
Source Code for Dpilot
 
End to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux SagaEnd to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux Saga
 
Using Change Streams to Keep Up with Your Data
Using Change Streams to Keep Up with Your DataUsing Change Streams to Keep Up with Your Data
Using Change Streams to Keep Up with Your Data
 
Unit testing powershell
Unit testing powershellUnit testing powershell
Unit testing powershell
 
Akka.NET streams and reactive streams
Akka.NET streams and reactive streamsAkka.NET streams and reactive streams
Akka.NET streams and reactive streams
 
How to practice TDD without shooting yourself in the foot
How to practice TDD without shooting yourself in the footHow to practice TDD without shooting yourself in the foot
How to practice TDD without shooting yourself in the foot
 
Behind modern concurrency primitives
Behind modern concurrency primitivesBehind modern concurrency primitives
Behind modern concurrency primitives
 
Understanding reactive programming with microsoft reactive extensions
Understanding reactive programming  with microsoft reactive extensionsUnderstanding reactive programming  with microsoft reactive extensions
Understanding reactive programming with microsoft reactive extensions
 
201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harian201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harian
 
Fia fabila
Fia fabilaFia fabila
Fia fabila
 
XTW_Import
XTW_ImportXTW_Import
XTW_Import
 
Agile Swift
Agile SwiftAgile Swift
Agile Swift
 
Tugas 2
Tugas 2Tugas 2
Tugas 2
 
C#
C#C#
C#
 
Easy Button
Easy ButtonEasy Button
Easy Button
 
Async JavaScript in ES7
Async JavaScript in ES7Async JavaScript in ES7
Async JavaScript in ES7
 
The Ring programming language version 1.5.2 book - Part 39 of 181
The Ring programming language version 1.5.2 book - Part 39 of 181The Ring programming language version 1.5.2 book - Part 39 of 181
The Ring programming language version 1.5.2 book - Part 39 of 181
 

Similar to Integration test framework

JDBC Connecticity.ppt
JDBC Connecticity.pptJDBC Connecticity.ppt
JDBC Connecticity.ppt
Swapnil Kale
 
NestJS
NestJSNestJS
NestJS
Wilson Su
 
Mobile Day - React Native
Mobile Day - React NativeMobile Day - React Native
Mobile Day - React Native
Software Guru
 
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
Codemotion
 
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
탑크리에듀(구로디지털단지역3번출구 2분거리)
 
Unittesting JavaScript with Evidence
Unittesting JavaScript with EvidenceUnittesting JavaScript with Evidence
Unittesting JavaScript with Evidence
Tobie Langel
 
"Enabling Googley microservices with gRPC" at JEEConf 2017
"Enabling Googley microservices with gRPC" at JEEConf 2017"Enabling Googley microservices with gRPC" at JEEConf 2017
"Enabling Googley microservices with gRPC" at JEEConf 2017
Alex Borysov
 
Unit testing zend framework apps
Unit testing zend framework appsUnit testing zend framework apps
Unit testing zend framework apps
Michelangelo van Dam
 
Testdrevet javautvikling på objektorienterte skinner
Testdrevet javautvikling på objektorienterte skinnerTestdrevet javautvikling på objektorienterte skinner
Testdrevet javautvikling på objektorienterte skinnerTruls Jørgensen
 
Mocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnitMocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnit
mfrost503
 
Jason parsing
Jason parsingJason parsing
Jason parsing
parallelminder
 
Unit testing CourseSites Apache Filter
Unit testing CourseSites Apache FilterUnit testing CourseSites Apache Filter
Unit testing CourseSites Apache Filter
Wayan Wira
 
PHPunit and you
PHPunit and youPHPunit and you
PHPunit and you
markstory
 
Android dev 3
Android dev 3Android dev 3
Android dev 3
Aravindharamanan S
 
Message-based communication patterns in distributed Akka applications
Message-based communication patterns in distributed Akka applicationsMessage-based communication patterns in distributed Akka applications
Message-based communication patterns in distributed Akka applications
Andrii Lashchenko
 
Anton Moldovan "Load testing which you always wanted"
Anton Moldovan "Load testing which you always wanted"Anton Moldovan "Load testing which you always wanted"
Anton Moldovan "Load testing which you always wanted"
Fwdays
 
Nodejs do teste de unidade ao de integração
Nodejs  do teste de unidade ao de integraçãoNodejs  do teste de unidade ao de integração
Nodejs do teste de unidade ao de integração
Vinícius Pretto da Silva
 
Mocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnitMocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnitmfrost503
 
JDBC JAVA DATABASE CONNECTIVITY AND JAVA
JDBC JAVA DATABASE CONNECTIVITY AND JAVAJDBC JAVA DATABASE CONNECTIVITY AND JAVA
JDBC JAVA DATABASE CONNECTIVITY AND JAVA
AdarshSrungarapu
 

Similar to Integration test framework (20)

JDBC Connecticity.ppt
JDBC Connecticity.pptJDBC Connecticity.ppt
JDBC Connecticity.ppt
 
NestJS
NestJSNestJS
NestJS
 
Mobile Day - React Native
Mobile Day - React NativeMobile Day - React Native
Mobile Day - React Native
 
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
 
Code
CodeCode
Code
 
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
 
Unittesting JavaScript with Evidence
Unittesting JavaScript with EvidenceUnittesting JavaScript with Evidence
Unittesting JavaScript with Evidence
 
"Enabling Googley microservices with gRPC" at JEEConf 2017
"Enabling Googley microservices with gRPC" at JEEConf 2017"Enabling Googley microservices with gRPC" at JEEConf 2017
"Enabling Googley microservices with gRPC" at JEEConf 2017
 
Unit testing zend framework apps
Unit testing zend framework appsUnit testing zend framework apps
Unit testing zend framework apps
 
Testdrevet javautvikling på objektorienterte skinner
Testdrevet javautvikling på objektorienterte skinnerTestdrevet javautvikling på objektorienterte skinner
Testdrevet javautvikling på objektorienterte skinner
 
Mocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnitMocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnit
 
Jason parsing
Jason parsingJason parsing
Jason parsing
 
Unit testing CourseSites Apache Filter
Unit testing CourseSites Apache FilterUnit testing CourseSites Apache Filter
Unit testing CourseSites Apache Filter
 
PHPunit and you
PHPunit and youPHPunit and you
PHPunit and you
 
Android dev 3
Android dev 3Android dev 3
Android dev 3
 
Message-based communication patterns in distributed Akka applications
Message-based communication patterns in distributed Akka applicationsMessage-based communication patterns in distributed Akka applications
Message-based communication patterns in distributed Akka applications
 
Anton Moldovan "Load testing which you always wanted"
Anton Moldovan "Load testing which you always wanted"Anton Moldovan "Load testing which you always wanted"
Anton Moldovan "Load testing which you always wanted"
 
Nodejs do teste de unidade ao de integração
Nodejs  do teste de unidade ao de integraçãoNodejs  do teste de unidade ao de integração
Nodejs do teste de unidade ao de integração
 
Mocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnitMocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnit
 
JDBC JAVA DATABASE CONNECTIVITY AND JAVA
JDBC JAVA DATABASE CONNECTIVITY AND JAVAJDBC JAVA DATABASE CONNECTIVITY AND JAVA
JDBC JAVA DATABASE CONNECTIVITY AND JAVA
 

Recently uploaded

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 

Recently uploaded (20)

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 

Integration test framework

  • 3. Supply-side platform Demand-side platform Supply-side platform Supply-side platform
  • 4. Supply-side platform Demand-side platform REQUEST RESPONSE
  • 5. Test framework Demand-side platform REQUEST RESPONSE
  • 6. Test 1. Create request 2. Send request from AppNexus 3. Test response
  • 7. cerateRequest() { request = new Request(); } sendRequest(String sspName) { requester = getRequester(sspName); response = requester.send(request); } testResponse() { If (response.isNoBid()) { throw new NoBidResponseException(response); } }
  • 8. Test 1. Create request with American IP address 2. Send request from AppNexus 3. Test response
  • 9. cerateRequest() { request = new Request(); } sendRequest(String sspName) { requester = getRequester(sspName); response = requester.send(request); } testResponse() { If (response.isNoBid()) { throw new NoBidResponseException(response); } }
  • 10. cerateRequest() { request = new Request(); } cerateRequestWithIpAddress(String country) { request = new Request() .setIP(geoIp.getIp(country)); } sendRequest(String sspName) { requester = getRequester(sspName); response = requester.send(request); } testResponse() { If (response.isNoBid()) { throw new NoBidResponseException(response); } }
  • 11. Test 1. Create request with Verizon mobile carrier 2. Send request from AppNexus 3. Test response
  • 12. cerateRequest() { request = new Request(); } cerateRequestWithIpAddress(String country) { request = new Request() .setIP(geoIp.getIp(country)); } sendRequest(String sspName) { requester = getRequester(sspName); response = requester.send(request); } testResponse() { If (response.isNoBid()) { throw new NoBidResponseException(response); } }
  • 13. cerateRequest() { request = new Request(); } cerateRequestWithIpAddress(String country) { request = new Request() .setIP(geoIp.getIp(country)); } cerateRequestWithMobileCarrier(String carrier)) { request = new Request() .setMobileCarrier(carrier); } sendRequest(String sspName) { requester = getRequester(sspName); response = requester.send(request); } testResponse() { If (response.isNoBid()) { throw new NoBidResponseException(response); } }
  • 14. cerateRequest() { request = new Request(); } sendRequest(String sspName) { requester = getRequester(sspName); response = requester.send(request); } testResponse() { If (response.isNoBid()) { throw new NoBidResponseException(response); } } cerateRequestWithIpAddress(String country) { request = new Request() .setIP(geoIp.getIp(country)); } sendRequest(String sspName) { requester = getRequester(sspName); response = requester.send(request); } testResponse() { If (response.isNoBid()) { throw new NoBidResponseException(response); } } cerateRequestWithMobileCarrier(String carrier)) { request = new Request() .setMobileCarrier(carrier); } sendRequest(String sspName) { requester = getRequester(sspName); response = requester.send(request); } testResponse() { If (response.isNoBid()) { throw new NoBidResponseException(response); } }
  • 15. Test 1. Create request 2. Send request from AppNexus 3. Test response
  • 16. class RequestCreator { Context context; RequestCreator(Context context) { this.context = context; } }
  • 18. class RequestCreator { Context context; RequestCreator(Context context) { this.context = context; } }
  • 19. cerateRequest() { request = new Request(); context.setValue(Context.REQUEST, request); } cerateRequestWithIpAddress(String country) { request = new Request() .setIP(geoIp.getIp(country)); context.setValue(Context.REQUEST, request); } cerateRequestWithMobileCarrier(String carrier)) { request = new Request() .setMobileCarrier(carrier); context.setValue(Context.REQUEST, request); }
  • 20. class RequestSender { Context context; RequestSender(Context context) { this.context = context; } }
  • 21. sendRequest(String sspName) { request = context.getValue(Context.REQUEST); requester = getRequester(sspName); response = requester.send(request); context.setValue(Context.RESPONSE, response); }
  • 22. class RequestTester { Context context; RequestTester(Context context) { this.context = context; } }
  • 23. testResponse() { response = context.getValue(Context.RESPONSE); If (response.isNoBid()) { throw new NoBidResponseException(response); } }
  • 24. public class Context { public static final Context<Request> REQUEST = new Context<>(); public static final Context<Response> RESPONSE = new Context<>(); private final Map<Context, Object> context = new HashMap<>(); public <Value> Context setValue(final Context<Value> context, Value value) { context.put(context, value); return this; } public <Value> Value getValue(final Context<Value> context) { return (Value) context.get(context) }
  • 25. cerateRequest() { request = new Request(); context.setValue(Context.REQUEST, request); } cerateRequestWithIpAddress(String country) { request = new Request() .setIP(geoIp.getIp(country)); context.setValue(Context.REQUEST, request); } cerateRequestWithMobileCarrier(String carrier)) { request = new Request() .setMobileCarrier(carrier); context.setValue(Context.REQUEST, request); }
  • 26. sendRequest(String sspName) { request = context.getValue(Context.REQUEST); requester = getRequester(sspName); response = requester.send(request); context.setValue(Context.RESPONSE, response); }
  • 27. testResponse() { response = context.getValue(Context.RESPONSE); If (response.isNoBid()) { throw new NoBidResponseException(response); } }
  • 28. public class SharedBrowser { private static final Browser BROWSER = new Browser(); static { final ShutdownHook shutdownHook = new ShutdownHook(BROWSER); Runtime.getRuntime() .addShutdownHook(shutdownHook); } }
  • 29. public class ShutdownHook extends Thread { private final Closeable closeable; ShutdownHook(final Closeable closeable) { this.closeable = closeable; } void run() { closeable.close(); } }