Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PG tests to cover auction and tokens #1589

Merged
merged 3 commits into from
Feb 7, 2022

Conversation

hupaloo
Copy link
Contributor

@hupaloo hupaloo commented Nov 23, 2021

Add tests for PG auction, tokens

Not only those PG tests, but all (also from other PRs) have passed
[WARNING] Tests run: 246, Failures: 0, Errors: 0, Skipped: 10
[INFO] prebid-server ...................................... SUCCESS [06:02 min]

@hupaloo hupaloo added the tests Functional or other tests label Nov 23, 2021
assert sentToBidder?.size() == lineItemCount
assert sentToBidder.sort() == lineItemIds.sort()

def sentToBidderAsTopMatch = auctionResponse.ext?.debug?.pgmetrics?.sentToBidderAsTopMatch?.get(GENERIC.value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we replace the key in sentToBidderAsTopMatch with BidderName?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it may be used bidder alias in the request to PBS (it may be any string).


and: "Bid response"
def bidResponse = BidResponse.getDefaultBidResponse(bidRequest)
bidder.setResponse(bidRequest.id, bidResponse)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can avoid setting the default response from the bidder

@Net-burst Net-burst merged commit 3a6f0a5 into add-pg-tests-infrastructure Feb 7, 2022
@Net-burst Net-burst deleted the add-auction-token-pg-tests branch February 7, 2022 09:22
Net-burst pushed a commit that referenced this pull request Feb 7, 2022
* Add PG tests to cover auction and tokens

* Removed setting bid response where it doesn't matter

* Use soft assert where needed; parametrization style updated

Co-authored-by: mhupalo <mhupalo@rubiconproject.com>
Net-burst added a commit that referenced this pull request Feb 10, 2022
* Add PG tests infrastructure

* Add cleanup after spec

* Remove checkRequestCount method; add override annotation for some methods

* Add PG tests for alert, currency, plans, register services (#1582)

* Add PG tests for Alert, Currency, Plans, Register services

* Add currency conversion rates mock; fix CurrencySpec

* Moved setting bid request and response to the setup()

* Use soft assert where needed

Co-authored-by: mhupalo <mhupalo@rubiconproject.com>

* Add PG tests to cover auction and tokens (#1589)

* Add PG tests to cover auction and tokens

* Removed setting bid response where it doesn't matter

* Use soft assert where needed; parametrization style updated

Co-authored-by: mhupalo <mhupalo@rubiconproject.com>

* Add PG bidder request, bid response, user details specs (#1590)

* Add PG bidder request, bid response, user details specs

* Resolve PR remarks

* Use soft assert where needed

Co-authored-by: mhupalo <mhupalo@rubiconproject.com>

* Add PG report, targeting specs (#1591)

* Add PG report, targeting specs

* Resolve PR remarks

* Add test case to cover domain targeting bug

* Add test cases to cover scalar and array inputs by site/user first party data, bidder params

* Add test case to cover NPE is not thrown by site/user first party data

Co-authored-by: mhupalo <mhupalo@rubiconproject.com>
Co-authored-by: rpanchyk <rpanchyk@rubiconproject.com>

* Minor refactoring

* Add cleanup steps after each test class

* Change fetching PG properties, add waiters on line items fetch

* Minor style fix

Co-authored-by: mhupalo <mhupalo@rubiconproject.com>
Co-authored-by: rpanchyk <rpanchyk@rubiconproject.com>
Co-authored-by: Oleksandr Zhevedenko <net.burst.mail@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Functional or other tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants