Skip to content

Update project architecture#80

Merged
echebbi merged 40 commits into
pitest:masterfrom
echebbi:update-project-architecture
Aug 15, 2019
Merged

Update project architecture#80
echebbi merged 40 commits into
pitest:masterfrom
echebbi:update-project-architecture

Conversation

@echebbi
Copy link
Copy Markdown
Collaborator

@echebbi echebbi commented Jun 17, 2019

Not much functional changes, but important refactoring of Pitclipse's architecture.

Changes in the architecture

The new architecture:

  • relies on a target platform to avoid platform-dependent builds
  • uses only OSGi bundles and avoids declaring dependencies in POM files
  • is split into more bundles in order to separate concerns

Version changes

This PR also introduces some major version changes:

  • bump Java version to 1.8
  • bump Pitest version to 1.4.6
  • bump project's version to 2.0.0

Code quality improvement

checkstyle.xml has also been slightly modified:

  • remove deprecated maxLineLength property of LeftCurly rule
  • allow methods that start with a single lower case letter

The code has been cleaned so that it is consistent and in accordance with Checkstyle's rules.

More tests are automated

Both unit & integration tests are launched by Travis CI.

Improved documentation

License headers have been added to source files.

Added some Markdown files that:

  • present the architecture
  • explain how to contribute

Fixed issues

This PR should fix the following issues:

echebbi added 6 commits May 4, 2019 23:53
Since it is very unlikely to do Eclipse RCP development without Eclipse IDE,
those files actually make easier to share projects between developers.
This architecture:
 - relies on a target platform to avoid platform-dependent builds
 - uses only OSGi bundles and avoids declaring dependencies in POM files

This commit introduces some major version changes:
 - bump Java version to 1.8
 - bump Pitest version to 1.4.6
 - bump project's version to 2.0.0-SNAPSHOT

checkstyle.xml has also been slightly modified:
 - remove deprecated maxLineLength property of LeftCurly rule
 - allow methods that start with a single lower case letter

Also clean code style so that it is consistent and in accordance
with Checkstyle's rules (fixes #70).

Build is automated with Travis CI (#69).
.story files are used by JBehave to describe tests in a Gherkin syntax
.feature files are used by Cucumber to describe tests in a Gherkin syntax

Since we are going to replace JBehave with Cucumber, we have to rename the existing .story files.

This commit allows Git to keep the history of changes of those files.
This commit uses Cucumber instead of JBehave to run BDD tests.
I made this choice because Cucumber seemed easier to integrate
within a Tycho build, especially because JBehave's JAR does not
include its dependencies.

As the two libraries usedvery similar API, changes made to the code are really minor.

/!\ 1 test still fail, likely because the away launch configurations are created has changed

Travis CI is able to run UI tests (#6).
@echebbi echebbi requested a review from philglover June 17, 2019 18:07
@echebbi echebbi self-assigned this Jun 17, 2019
@echebbi echebbi changed the title [WIP] Update project architecture Update project architecture Jun 27, 2019
@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 12, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@d96b2d2). Click here to learn what that means.
The diff coverage is 85.02%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #80   +/-   ##
=========================================
  Coverage          ?   85.02%           
  Complexity        ?      299           
=========================================
  Files             ?       45           
  Lines             ?     1242           
  Branches          ?       88           
=========================================
  Hits              ?     1056           
  Misses            ?      126           
  Partials          ?       60
Impacted Files Coverage Δ Complexity Δ
...pitclipse/runner/server/PitServerProviderImpl.java 0% <0%> (ø) 0 <0> (?)
...er/src/org/pitest/pitclipse/runner/PitRequest.java 100% <100%> (ø) 6 <6> (?)
...org/pitest/pitclipse/runner/results/Mutations.java 100% <100%> (ø) 3 <3> (?)
.../results/summary/SummaryResultListenerFactory.java 100% <100%> (ø) 4 <4> (?)
...test/pitclipse/runner/config/PitConfiguration.java 100% <100%> (ø) 12 <12> (?)
.../pitest/pitclipse/runner/model/MutationSorter.java 100% <100%> (ø) 4 <4> (?)
...esults/mutations/RecordingMutationsDispatcher.java 100% <100%> (ø) 3 <3> (?)
...est/pitclipse/runner/service/PitclipseService.java 100% <100%> (ø) 2 <2> (?)
...itest/pitclipse/runner/client/PitCommunicator.java 100% <100%> (ø) 2 <2> (?)
...pitest/pitclipse/ui/notify/PitResultsNotifier.java 100% <100%> (ø) 3 <3> (?)
... and 35 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d96b2d2...33b9445. Read the comment docs.

echebbi added a commit that referenced this pull request Aug 14, 2019
This commit corresponds to the following PR:
 - #80

Its purpose is to ensure that the reason why Travis fails to build
PR#80 is that the PR comes from a fork and, as a result, is not allowed
to use Travis CI's encrypted variables.

Since this branch is internal, the build should be successful.
Update code according to Checkstyle's rules.
The new jacoco Maven profile allows to compute code's coverage
thanks to JaCoCo. It can be used as follows:

 * mvn verify -P jacoco

All reports are aggregated by the org.pitest.pitclipse.tests.coverage.report
module and then sent to CodeCov.
Sonar analysis is only run when the branch belongs to the pitest/pitclipse
repository. Indeed, sending the results of the the analysis to SonarCloud
requires the encrypted SONAR token which is not provided by Travis CI when
the build comes from a fork.

The code checking whether the analysis can be run is located in .travis/build.sh
and is called by the .travis.yml configuration file.

I also struggled a bit to encrypt the token because encryption on travis-ci.com
is different from encryption on travis-ci.org. For the record here is what I did:
 > travis login --pro
 > travis encrypt --pro <token> -r pitest/pitclipse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants