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

[#1212] introduce testng #1215

Merged
merged 19 commits into from Jun 12, 2019

Conversation

Projects
None yet
4 participants
@Rascat
Copy link
Contributor

commented Apr 15, 2019

Junit tests are run with JUnit4

The project still bundles both testing frameworks. surefire will still use the Junit4 runner to run JUnit tests.

Implements example migration of gradoop-common

Every JUnit test in the common submodule is refactored as testNG test.
This serves as an example that
a) most cases can easily be refactored by replacing import static org.junit.Assert with import static org.testng.AssertJUnit.*;
b) parameterized test can be written more concise

The newly introduced setup uses the gradoop-common-testng.xml file to define a test suite and configures the surefire plugin to use that file

@Rascat Rascat changed the title [#1212] introduce testng WIP: [#1212] introduce testng Apr 18, 2019

@Rascat Rascat changed the title WIP: [#1212] introduce testng [#1212] introduce testng Apr 18, 2019

Rascat and others added some commits Mar 19, 2019

Add dependency, add tests
* Add dependency JUnitParams for concise parameterized tests
* Add tests for GradoopId's isValid() method
Implement PR feedback
* add @link tag where possible
* add newline where necessary
* explain invalid hex strings
Change tests of GradoopId.isValid()
* replace short hex string with a more realistic one
* add messages to assertions
Lucas
[#1212] Introduce TestNG
* Junit tests are run with JUnit4
* TestNG tests are run with TestNG
* Suppress TestNG XMLReporter error log
Lucas
[#1212] Refactor PropertyValueTest
* Test class now uses TestNG
* Use parameterized tests where possible
Lucas

@Rascat Rascat force-pushed the Rascat:1212-introduce-testng branch from be66f8c to 550b7d2 Apr 26, 2019

[#1212] Migrate gradoop-common: junit to testng
* replace junit assertions with testng counterparts
* refactor parameterized tests
* simplify assertions where possible
* add gradoop-common-testng.xml in order to define test suite
* configure surefire to use newly added testng.xml
@timo95
Copy link
Contributor

left a comment

Some DataProviders for PropertyValueTest are very similar. Maybe they can be combined? For example by using the DataProvider(Method m) parameter?

Rascat added some commits May 13, 2019

[#1212] Add null to array of supported data types
* combine testCreate and testCreateWithNull
* replace assertThat with assertEquals
* Test if PropertyValue type conversions raise UnsupportedOperationException
* refactor PropertyValue.get() to prevent NullPointerException
@Rascat

This comment has been minimized.

Copy link
Contributor Author

commented May 13, 2019

Some DataProviders for PropertyValueTest are very similar. Maybe they can be combined? For example by using the DataProvider(Method m) parameter?

I also like the idea of combining data providers. on could for example zip an array of all supported PropertyValues with an array of expected output values. i could not find a convenient way to achieve this though

Rascat added some commits May 13, 2019

@timo95

timo95 approved these changes May 21, 2019

Copy link
Contributor

left a comment

LGTM

@galpha

galpha approved these changes Jun 7, 2019

Copy link
Contributor

left a comment

LGTM

galpha added some commits Jun 7, 2019

@galpha galpha merged commit 2cb03a3 into dbs-leipzig:develop Jun 12, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.