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

Increase code coverage #34

Open
milmazz opened this issue Jan 23, 2025 · 0 comments
Open

Increase code coverage #34

milmazz opened this issue Jan 23, 2025 · 0 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@milmazz
Copy link
Contributor

milmazz commented Jan 23, 2025

Currently, the unit tests cover around 53% of the code, I'm sure we can do better than that:

$ mix test --cover
Cover compiling modules ...
.......**.........
Finished in 0.4 seconds (0.4s async, 0.00s sync)
18 tests, 0 failures, 2 skipped

Randomized with seed 451769

Generating cover results ...

Percentage | Module
-----------|--------------------------
     0.00% | ExlasticSearch.Model.SearchResult
     0.00% | ExlasticSearch.Retry.Decorator
     0.00% | Scrivener.Paginater.ExlasticSearch.Query
    22.00% | ExlasticSearch.Query
    46.67% | ExlasticSearch.Aggregation
    50.00% | ExlasticSearch.Retry.ExponentialBackoff
    53.85% | ExlasticSearch.BulkOperation
    60.00% | ExlasticSearch.Indexable.ExlasticSearch.MultiVersionTestModel
    60.00% | ExlasticSearch.Indexable.ExlasticSearch.TestModel
    60.00% | ExlasticSearch.Indexable.ExlasticSearch.TestModel2
    63.22% | ExlasticSearch.Repo
    66.67% | ExlasticSearch.Indexable
    71.43% | ExlasticSearch.Model
    71.43% | ExlasticSearch.Response
   100.00% | ExlasticSearch
   100.00% | ExlasticSearch.MultiVersionTestModel
   100.00% | ExlasticSearch.MultiVersionTestModel.SearchResult
   100.00% | ExlasticSearch.Response.Hits
   100.00% | ExlasticSearch.Response.Record
   100.00% | ExlasticSearch.Response.Search
   100.00% | ExlasticSearch.RetryStrategy
   100.00% | ExlasticSearch.TestModel
   100.00% | ExlasticSearch.TestModel.SearchResult
   100.00% | ExlasticSearch.TestModel2
   100.00% | ExlasticSearch.TestModel2.SearchResult
   100.00% | ExlasticSearch.TypeInference
   100.00% | ExlasticSearch.TypeInference.API
   100.00% | ExlasticSearch.TypeInference.Base
-----------|--------------------------
    53.85% | Total

Coverage test failed, threshold not met:

    Coverage:   53.85%
    Threshold:  90.00%

Generated HTML coverage results in "cover" directory

Also, there are 2 unit tests that are currently skipped, we should see why those two tests are failing and fix the situation.

@milmazz milmazz added help wanted Extra attention is needed good first issue Good for newcomers labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant