nos icon indicating copy to clipboard operation
nos copied to clipboard

Devx/use test plans

Open joshuatbrown opened this issue 1 year ago • 0 comments

Issues covered

Add reference(s) to a related issue in your repository.

Description

In addition to converting to Test Plans, I'd like to update the way we use our targets. In the old days, we needed to add production files to both the production target and the test target. These days, that's no longer required, but I've noticed that a lot of our files are still added to both, and our tests depend on this older way of doing things. I'm assuming the current files-in-two-targets approach is just legacy and can be updated, but let me know if I'm missing something.

There are some issues with this PR as it stands. RelayService is getting initialized when the tests run, probably because our app code is running alongside our tests as described in the Testing Gotchas docs for swift-dependencies. Additionally, they make a point we've discussed separately:

This does not happen when running tests for frameworks or SwiftPM libraries, which is yet another good reason to modularize your code base.

I'd love to see us go that route and start using local Swift packages to modularize our code and make it easier to test.

The use of the production RelayService seems to be causing the tests to crash sometimes, so we'll need to sort that out. I'll probably need some help with that.

How to test

  1. Run the unit tests
  2. Sometimes they pass, sometimes they crash.

joshuatbrown avatar May 16 '24 21:05 joshuatbrown

Sounds great! Are you able to make changes to Bluesky backend API? Or if no, what's your plan broadly?

xenohunter avatar Apr 13 '23 09:04 xenohunter

well, I was hoping to just use the current search API (search.bsky.social) and filter client-side, but it looks like maybe the API only returns a fixed number of results, have you looked at it at all?

hoke-t avatar Apr 16 '23 16:04 hoke-t

Not yet but I was planning to sometimes next week. I can add a brief summary here.

xenohunter avatar Apr 16 '23 17:04 xenohunter