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

Refactor tests #101

Open
7 tasks
claucece opened this issue Apr 10, 2018 · 4 comments
Open
7 tasks

Refactor tests #101

claucece opened this issue Apr 10, 2018 · 4 comments
Labels
API importance medium An issue that is medium level importance. It's good to have but not 100% necessary. library-issues

Comments

@claucece
Copy link
Member

claucece commented Apr 10, 2018

Why

A library should be correctly tested.

Reference

Please, refer to the test folder.

Tasks

  • Understand the scope of the test and remove what does not correspond to it.
  • Focus on creating tests that test overall functionality rather than unit test.
  • Think about what to expose for tests.
  • Check the variable names.
  • Remove repeated tests.
  • Remove or decide what to do with test test_api_messaging.
  • Check that everywhere real functionality is used: API tests should test the API, and not use "unit-like" functions on them.

Open questions

None.

@claucece claucece added the importance medium An issue that is medium level importance. It's good to have but not 100% necessary. label Jun 8, 2018
@claucece claucece added API and removed OTRv4 basics labels Jul 2, 2018
@olabini
Copy link
Contributor

olabini commented Sep 21, 2018

After discussing this, we have decided several things. Please add to this list if you remember something specific.
We should refactor the tests to be a bit more factored. We also need to make a distinction between unit tests and functional tests. We should do these things:

  • Create a new category of unit tests - either in a completely new directory, or using a naming convention like test_unit_client_profile.c
  • Make it possible to run functional and unit tests separately
  • Look at existing tests and move existing ones that look like unit tests into the newly created unit tests.
  • Make it possible to run unit tests separately
  • Make it possible to capture coverage information for unit tests only.

@olabini olabini self-assigned this Sep 22, 2018
@olabini
Copy link
Contributor

olabini commented Sep 22, 2018

I'll do the unit test refactoring and then unassign myself

@claucece
Copy link
Member Author

Thanks @olabini

@olabini olabini removed their assignment Sep 27, 2018
@claucece
Copy link
Member Author

claucece commented Dec 7, 2018

This is something we can tackle at the assembly at CCC. We should create tasks. But this can be a nice start for people in OTRv4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API importance medium An issue that is medium level importance. It's good to have but not 100% necessary. library-issues
Projects
None yet
Development

No branches or pull requests

2 participants