[ANALYTICS-455] Investigate how to improve unit tests and mock API for Google Analytics 4 Created: 22/May/23  Updated: 29/May/23  Resolved: 25/May/23

Status: Closed
Project: Analytics
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Thuy To Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2023-05-22-13-14-39-250.png    
Issue Links:
relation
is related to ANALYTICS-437 Generate UnitTests for GA4 Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Story Points: 1
Team: AuthorX

 Description   

Problem: We cannot mock to call API for GA4

BetaAnalyticsDataClient analyticsDataClient = BetaAnalyticsDataClient.create(analyticsDataSettings)

 in GoogleAnalytics4DataSupplier and GoogleAnalytics4MetadataSupplier, so unit tests are almost depended on GA4ReportingEngine.

 

Expectation: Improve unit tests and mock API for GoogleAnalytics4DataSupplierTest and GoogleAnalytics4MetadataSupplierTest

Code coverage should be increased.


Generated at Sun Feb 11 23:19:01 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.