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

SDK 2228 DMA Test automation #1377

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

NidhiDixit09
Copy link
Collaborator

Reference

SDK-2228 -- DMA Compliance testing automation
https://branch.atlassian.net/browse/SDK-2228

Summary

  • Added buttons in Test Bed App -
    • Set DMA Params - It calls Branch.setDMAParamsForEEA API
    • Send V2 Event - It calls BranchEvent.standardEvent API
  • Updated logging Function and moved initialization code to Button click events.
  • Changed linking method to cocoapods from static lib.
    Note : Ref is added to branch 'SDK-2228-iOS-DMA-Compliance-Automation' in workflow for testing purpose only. It will be reverted back before merging into master branch.

Type Of Change

  • New feature (non-breaking change which adds functionality)

Testing Instructions

Run workflow from this branch manually and verify in logs( or Browserstack) that Set DMA Params test passed.

cc @BranchMetrics/saas-sdk-devs for visibility.

Copy link

codecov bot commented Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.06%. Comparing base (1836823) to head (ec875ad).
Report is 9 commits behind head on master.

❗ Current head ec875ad differs from pull request most recent head e15fff6. Consider uploading reports for the commit e15fff6 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1377      +/-   ##
==========================================
- Coverage   51.10%   51.06%   -0.04%     
==========================================
  Files          66       66              
  Lines       10158    10126      -32     
  Branches     3724     3712      -12     
==========================================
- Hits         5191     5171      -20     
+ Misses       4707     4701       -6     
+ Partials      260      254       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -7,6 +7,7 @@

#import "NSURLSessionBranch.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

Swizzles are normally named like categories`NSURLSession+Branch.h". Not a blocking suggestion though.

@echo-branch
Copy link
Contributor

@NidhiDixit09
Just took a closer look at this test app and I'm gonna make a follow up ticket to modernize it. It's got some odd existing design choices.

@echo-branch echo-branch self-requested a review April 23, 2024 21:28
@@ -65,28 +71,37 @@ class HomeViewController: UITableViewController {
CommonMethod.sharedInstance.contentMetaData = nil
reachability = Reachability()!
reachability!.whenReachable = { reachability in

Branch.setBranchKey("key_test_om2EWe1WBeBYmpz9Z1mdpopouDmoN72T")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change to allow no tracking changes prior to first events?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right.

} else if textValue == "setDMAParams" {
self.logData = "Error: Missing testData.\n"

let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to move this logic into a helper method? It's kindof long.

} else if textValue == "sendV2Event" {
self.logData = ""

let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar request to move check logic into it's own method.

@ahmednawar
Copy link
Contributor

@NidhiDixit09 what's next for this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants