SlideShare ist ein Scribd-Unternehmen logo
1 von 30
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?

Weitere ähnliche Inhalte

Was ist angesagt?

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 SagaBabacar 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 DataEvan 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 streamsBartosz 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 footDennis Doomen
 
Behind modern concurrency primitives
Behind modern concurrency primitivesBehind modern concurrency primitives
Behind modern concurrency primitivesBartosz 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 extensionsOleksandr Zhevzhyk
 
201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harian201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harianKhairunnisaPekanbaru
 
Async JavaScript in ES7
Async JavaScript in ES7Async JavaScript in ES7
Async JavaScript in ES7Mike 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 181Mahmoud Samir Fayed
 

Was ist angesagt? (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
 

Ähnlich wie Integration test framework

JDBC Connecticity.ppt
JDBC Connecticity.pptJDBC Connecticity.ppt
JDBC Connecticity.pptSwapnil Kale
 
Mobile Day - React Native
Mobile Day - React NativeMobile Day - React Native
Mobile Day - React NativeSoftware 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 2017Codemotion
 
#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 EvidenceTobie 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 2017Alex Borysov
 
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 PHPUnitmfrost503
 
Unit testing CourseSites Apache Filter
Unit testing CourseSites Apache FilterUnit testing CourseSites Apache Filter
Unit testing CourseSites Apache FilterWayan Wira
 
PHPunit and you
PHPunit and youPHPunit and you
PHPunit and youmarkstory
 
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 applicationsAndrii 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çãoViní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 JAVAAdarshSrungarapu
 

Ähnlich wie 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
 

Kürzlich hochgeladen

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

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(); } }