You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 17 Next »

Contents

Project overview (SLING-1437)

The goal of this Google Summer of Code project is to create more unit and integration tests for Sling, as well as measure the test coverage that the combination of unit and integration tests provide. Petr Shypila has been accepted to work on it, mentored by Bertrand Delacretaz.

 

Weekly 3P reports

The 3P are:

Progress: what concrete work (code etc.) has been accomplished since the last report.

Problems: anything that has significantly slowed progress or is expected to do so going forward. Do not disclose anything personal or confidential here of course, such issues can be reported directly to your mentor as appropriate.

Perspectives: what progress is expected for the next period and later.

May 24th 3P report

Progress: started to write first unit tests for commons.schedule module. 

JIRA Issue SLING-4735 - Getting issue details... STATUS
Github pull requesthttps://github.com/apache/sling/pull/91
Patch file

Click to download

UPD 05/27/2015 Updated Version

Code coverage at the beginning
of the week 

0%
Code coverage at the end of the week50%
UPD 05/27/2015 72%

Problems:

  1. How to inject service if it defined as a private field. Only with reflection?
  2. I’ve tried to launch a test with @RunWith(SlingAnnotationsTestRunner.class)
    annotation to inject BundleContext with @TestReference annotation.
    But it doesn’t work for in my case. Does it injects only org.osgi.*
    bundles or any other Sling service too?
  3. I have created a test issue in JIRA for my current iteration. But I don’t see
    there a Assign To action. Is this okay?
  4. Which kind of tests I can do with:
    1. SettingsSupport - has only two simple methods.
    2. WhiteboardHandler - contains some private methods, which are used in other anonymous class. Also get this object with reflection and then test it? 
  5. Looks like there is no sense to cover with tests SchedulerServiceFactory since it is just a wrapper above QuartzScheduler which is already tested.

Perspectives:

In this week I plan to finish scheduler module and start to work on a new one.
What do you think about commons.threads? 

Mentor comments:

I suggest starting with SLING-4757, we can look at commons.threads later. 



May 31th 3P report

Progress: Finished tests for commons.schedule module. Finished unit tests for commons.contentdetection module.
Started to write integration tests for commons.contentdetection module.

JIRA Issue

SLING-4735 - Getting issue details... STATUS

SLING-4757 - Getting issue details... STATUS

Patch file

week2-part1-unit-tests.patch

week2-part2-integration-tests.patch

Problems:

I  think the only problem is that for next two weeks I have a lot of exams in my university. Most of them are pretty easy. But I can't ignore them at all.
On week June 1st - 7th I have one exam on Monday and another one on Friday(Both are easy). So it will affect my productivity a bit, but not too much. 

Perspectives:

I can cover some other modules with integration or unit tests, for example SLING-4541. 

Mentor comments:

Thanks for your report and for your work! SLING-4541 looks good as the next step, based on the experiences done with SLING-4757.

You don't need to attach your patches here, mentioning the JIRA issue numbers is sufficient.

Don't let GSoC ruin your exams, it's fine with me if you do less GSoC hours in the next two weeks and come back to your usual schedule after that.

 


June 7th 3P report

JIRA Issue

SLING-4541 - Getting issue details... STATUS

Progress: I covered with 100% internal.PathEntry class and improved up to 20% coverage of internal.DefaultContentCreator. Unfortunately I'm not quite satisfied with the result which I provide. It took some time to choose which approach should I use to write tests for this module. First time I tried to use JCR Mocks, unlikely(as I see), it doesn't provide enough functionality to do that, because there are still some required methods which are not implemented yet. So after that I switched to use JMock and since I didn't work with it before it also took time to understand how it works. So I will be happy to get some code review summary of my tests. Probably there is some better way to tests this module.

Problems:

This Monday starts me second week with exams in a university. 

Perspectives:

I plan to continue write new unit tests for this module.

Mentor comments:

Thanks for your report, I'll have a look at your tests and might suggest some alternative techniques - it's also fairly easy to get a JCR repository to run tests, even without setting up an OSGi framework, that might be an option here.

 


June 14th 3P report

JIRA Issue

SLING-4541 - Getting issue details... STATUS

Progress: I have covered with tests 3 methods of DefaultContentCreator using JCR Repository provider. New patch(week-3.patch) is also attached in a JIRA ticket.

Problems:

Everything seems okay.

Perspectives:

I plan to continue write new unit tests for DefaultContentCreator class.

Mentor comments:

Looks good, thanks! I'll have a look at your SLING-4151 patches hopefully today.

 


June 21th 3P report

JIRA Issue

SLING-4541 - Getting issue details... STATUS

Progress: Almost covered with tests DefaultContentCreator class and improved test coverage of ContentLoaderService up to 68%

Problems:

Everything seems okay.

Perspectives:

I plan to write few simple tests for DefaultContentCreator and concentrate on BundleContentLoader class.

  • No labels