Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
jjba23 committed Oct 30, 2024
1 parent f77e6d2 commit d499f77
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ Also, we love functional programming, Scala and ZIO ❤️.

/Tests should be the compass to study and prove the correctness of the behaviour of a system/.


#+begin_html
<figure>
<img src="./resources/zzspec-ai.webp"/>
<figcaption>zzspec's logo and banner is courtesy of ChatGPT</figcaption>
</figure>
#+end_html

** Vision

~zzspec~ considers the following to be *essential for good testing*:
Expand All @@ -44,7 +36,15 @@ Also, we love functional programming, Scala and ZIO ❤️.
- ensure we test functionalities, almost never test how the code is written / implemented (this gives flexibility and *freedom to refactor*).
- attempt to test all “user paths” and possible interactions with the system, good and bad, low load high load, etc.
- write many unit tests and property based tests where it makes sense. Preferably auto-generated test cases, with a set of inputs.


#+begin_html
<figure>
<img src="./resources/zzspec-ai.webp"/>
<figcaption>zzspec's logo and banner is courtesy of ChatGPT</figcaption>
</figure>
#+end_html


** Getting started

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/real-world-postgre-and-mockserver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ object BlackBoxSpec extends ZIOSpecDefault {
)

private def happyFlowEmptyListSpec: Spec[Any, Throwable] = cssofjBlackBoxTest(
specName = "Happy flow empty list of onboarding failures returned",
specName = "Happy flow empty list returned",
mockServerBehaviour = ZIO.serviceWithZIO[MockServer.Client](mockServer =>
keycloakReturnsTokenRestBehaviour *> prometheusPushingReturnsOkRestBehaviour
*> ZIO.attempt(
Expand All @@ -65,7 +65,7 @@ object BlackBoxSpec extends ZIOSpecDefault {
)

private def happyFlowListOf2Spec: Spec[Any, Throwable] = cssofjBlackBoxTest(
specName = "Happy flow list of 2 onboarding failures returned",
specName = "Happy flow list of 2 returned",
mockServerBehaviour =
keycloakReturnsTokenRestBehaviour *> prometheusPushingReturnsOkRestBehaviour *>
ZIO.serviceWithZIO[MockServer.Client](mockServer =>
Expand Down Expand Up @@ -105,10 +105,10 @@ object BlackBoxSpec extends ZIOSpecDefault {
)

private def happyFlowListOf1OneAlreadyExistsSpec: Spec[Any, Throwable] = cssofjBlackBoxTest(
specName = "Happy flow list of 1 onboarding failures returned, one non-alerted was already present in DB",
specName = "Happy flow list of 1 returned, one was already present in DB",
mockServerBehaviour = ZIO.serviceWithZIO[MockServer.Client](mockServer =>
keycloakReturnsTokenRestBehaviour *> prometheusPushingReturnsOkRestBehaviour *> ZIO.attempt(
mockServer.value.when(org.mockserver.model.HttpRequest.request().withPath("/api/v1/onboarding-failures"))
mockServer.value.when(org.mockserver.model.HttpRequest.request().withPath("/api/v1/some-endpoint"))
.respond(org.mockserver.model.HttpResponse.response().withStatusCode(200).withBody("""
{
"httpStatusCode": 200,
Expand Down

0 comments on commit d499f77

Please sign in to comment.