Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » how can you write unit tests to see your dynamic content help has been processed
how can you write unit tests to see your dynamic content help has been processed [message #474116] Fri, 27 June 2008 11:13 Go to next message
Edoardo Comar is currently offline Edoardo Comar
Messages: 102
Registered: July 2009
Senior Member
One of our help plugins contains a lot of <include>.

Sometime the included documents (which are generated) have errors that
prevent the include to work.

I would like to write a junit test that launches all the help pages
which have includes and checks that they are processed succesfully.

I am happy for the unit test to just use the internal help view.

any ideas / starting points ?
Re: how can you write unit tests to see your dynamic content help has been processed [message #474124 is a reply to message #474116] Thu, 03 July 2008 17:59 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
This ties in with an idea which I have been interested in which is to
add some infrastructure in the help system for verifying content.
Currently we have JUnit tests in org.eclipse.ua.tests which verify that
each page in a TOC can be loaded. The class which does this is
org.eclipse.ua.tests.help.toc.TocLinkChecker. It would be interesting to
extend this to add more checks for each page such as checking for
missing includes, images or broken interpage links. I don't have time to
do this in the near future but if you would be interested in
contributing the code to do the include checking I could give you
pointers on how to go about it.

Edoardo Comar wrote:
> One of our help plugins contains a lot of <include>.
>
> Sometime the included documents (which are generated) have errors that
> prevent the include to work.
>
> I would like to write a junit test that launches all the help pages
> which have includes and checks that they are processed succesfully.
>
> I am happy for the unit test to just use the internal help view.
>
> any ideas / starting points ?
Re: how can you write unit tests to see your dynamic content help has been processed [message #474125 is a reply to message #474124] Mon, 07 July 2008 09:47 Go to previous messageGo to next message
Edoardo Comar is currently offline Edoardo Comar
Messages: 102
Registered: July 2009
Senior Member
Thanks, but for now
I solved the problem by launching a workbench test that
instead of parsing
InputStream istream = HelpSystem.getHelpContent(href);
which returns a fileinputstream without having processed the include

goes through the webapp that serves the help pages
URL helpUrl = BaseHelpSystem.resolve(href, false);
and from the url -> inputstream -> sax input source ...

does the test trick for me :-)

Chris Goldthorpe wrote:
> This ties in with an idea which I have been interested in which is to
> add some infrastructure in the help system for verifying content.
> Currently we have JUnit tests in org.eclipse.ua.tests which verify that
> each page in a TOC can be loaded. The class which does this is
> org.eclipse.ua.tests.help.toc.TocLinkChecker. It would be interesting to
> extend this to add more checks for each page such as checking for
> missing includes, images or broken interpage links. I don't have time to
> do this in the near future but if you would be interested in
> contributing the code to do the include checking I could give you
> pointers on how to go about it.
>
> Edoardo Comar wrote:
>> One of our help plugins contains a lot of <include>.
>>
>> Sometime the included documents (which are generated) have errors that
>> prevent the include to work.
>>
>> I would like to write a junit test that launches all the help pages
>> which have includes and checks that they are processed succesfully.
>>
>> I am happy for the unit test to just use the internal help view.
>>
>> any ideas / starting points ?
Re: how can you write unit tests to see your dynamic content help has been processed [message #474126 is a reply to message #474125] Mon, 07 July 2008 10:20 Go to previous messageGo to next message
Eclipse User
Originally posted by: idupont.algorithmics.com

This is exactly the same funactionality that I need, however, I am not a
Java developer. Would you be willing to share (in detail, for a
non-developer) how this was accomplished?

Thanks,
Quinn

"Edoardo Comar" <ecomar@uk.ibm.com> wrote in message
news:g4t6pm$5i0$1@build.eclipse.org...
> Thanks, but for now
> I solved the problem by launching a workbench test that
> instead of parsing
> InputStream istream = HelpSystem.getHelpContent(href);
> which returns a fileinputstream without having processed the include
>
> goes through the webapp that serves the help pages
> URL helpUrl = BaseHelpSystem.resolve(href, false);
> and from the url -> inputstream -> sax input source ...
>
> does the test trick for me :-)
>
> Chris Goldthorpe wrote:
>> This ties in with an idea which I have been interested in which is to add
>> some infrastructure in the help system for verifying content. Currently
>> we have JUnit tests in org.eclipse.ua.tests which verify that each page
>> in a TOC can be loaded. The class which does this is
>> org.eclipse.ua.tests.help.toc.TocLinkChecker. It would be interesting to
>> extend this to add more checks for each page such as checking for missing
>> includes, images or broken interpage links. I don't have time to do this
>> in the near future but if you would be interested in contributing the
>> code to do the include checking I could give you pointers on how to go
>> about it.
>>
>> Edoardo Comar wrote:
>>> One of our help plugins contains a lot of <include>.
>>>
>>> Sometime the included documents (which are generated) have errors that
>>> prevent the include to work.
>>>
>>> I would like to write a junit test that launches all the help pages
>>> which have includes and checks that they are processed succesfully.
>>>
>>> I am happy for the unit test to just use the internal help view.
>>>
>>> any ideas / starting points ?
Re: how can you write unit tests to see your dynamic content help has been processed [message #474127 is a reply to message #474126] Mon, 07 July 2008 12:26 Go to previous message
Edoardo Comar is currently offline Edoardo Comar
Messages: 102
Registered: July 2009
Senior Member
Hi Quinn,
to use my approach you need to be able to write and run Eclipse Junit
tests.
There are plenty of learning resources on eclipse.org.



Quinn DuPont wrote:
> This is exactly the same funactionality that I need, however, I am not a
> Java developer. Would you be willing to share (in detail, for a
> non-developer) how this was accomplished?
>
> Thanks,
> Quinn
>
> "Edoardo Comar" <ecomar@uk.ibm.com> wrote in message
> news:g4t6pm$5i0$1@build.eclipse.org...
>> Thanks, but for now
>> I solved the problem by launching a workbench test that
>> instead of parsing
>> InputStream istream = HelpSystem.getHelpContent(href);
>> which returns a fileinputstream without having processed the include
>>
>> goes through the webapp that serves the help pages
>> URL helpUrl = BaseHelpSystem.resolve(href, false);
>> and from the url -> inputstream -> sax input source ...
>>
>> does the test trick for me :-)
>>
>> Chris Goldthorpe wrote:
>>> This ties in with an idea which I have been interested in which is to add
>>> some infrastructure in the help system for verifying content. Currently
>>> we have JUnit tests in org.eclipse.ua.tests which verify that each page
>>> in a TOC can be loaded. The class which does this is
>>> org.eclipse.ua.tests.help.toc.TocLinkChecker. It would be interesting to
>>> extend this to add more checks for each page such as checking for missing
>>> includes, images or broken interpage links. I don't have time to do this
>>> in the near future but if you would be interested in contributing the
>>> code to do the include checking I could give you pointers on how to go
>>> about it.
>>>
>>> Edoardo Comar wrote:
>>>> One of our help plugins contains a lot of <include>.
>>>>
>>>> Sometime the included documents (which are generated) have errors that
>>>> prevent the include to work.
>>>>
>>>> I would like to write a junit test that launches all the help pages
>>>> which have includes and checks that they are processed succesfully.
>>>>
>>>> I am happy for the unit test to just use the internal help view.
>>>>
>>>> any ideas / starting points ?
>
>
Re: how can you write unit tests to see your dynamic content help has been processed [message #618955 is a reply to message #474116] Thu, 03 July 2008 17:59 Go to previous message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
This ties in with an idea which I have been interested in which is to
add some infrastructure in the help system for verifying content.
Currently we have JUnit tests in org.eclipse.ua.tests which verify that
each page in a TOC can be loaded. The class which does this is
org.eclipse.ua.tests.help.toc.TocLinkChecker. It would be interesting to
extend this to add more checks for each page such as checking for
missing includes, images or broken interpage links. I don't have time to
do this in the near future but if you would be interested in
contributing the code to do the include checking I could give you
pointers on how to go about it.

Edoardo Comar wrote:
> One of our help plugins contains a lot of <include>.
>
> Sometime the included documents (which are generated) have errors that
> prevent the include to work.
>
> I would like to write a junit test that launches all the help pages
> which have includes and checks that they are processed succesfully.
>
> I am happy for the unit test to just use the internal help view.
>
> any ideas / starting points ?
Re: how can you write unit tests to see your dynamic content help has been processed [message #618957 is a reply to message #474124] Mon, 07 July 2008 09:47 Go to previous message
Edoardo Comar is currently offline Edoardo Comar
Messages: 102
Registered: July 2009
Senior Member
Thanks, but for now
I solved the problem by launching a workbench test that
instead of parsing
InputStream istream = HelpSystem.getHelpContent(href);
which returns a fileinputstream without having processed the include

goes through the webapp that serves the help pages
URL helpUrl = BaseHelpSystem.resolve(href, false);
and from the url -> inputstream -> sax input source ...

does the test trick for me :-)

Chris Goldthorpe wrote:
> This ties in with an idea which I have been interested in which is to
> add some infrastructure in the help system for verifying content.
> Currently we have JUnit tests in org.eclipse.ua.tests which verify that
> each page in a TOC can be loaded. The class which does this is
> org.eclipse.ua.tests.help.toc.TocLinkChecker. It would be interesting to
> extend this to add more checks for each page such as checking for
> missing includes, images or broken interpage links. I don't have time to
> do this in the near future but if you would be interested in
> contributing the code to do the include checking I could give you
> pointers on how to go about it.
>
> Edoardo Comar wrote:
>> One of our help plugins contains a lot of <include>.
>>
>> Sometime the included documents (which are generated) have errors that
>> prevent the include to work.
>>
>> I would like to write a junit test that launches all the help pages
>> which have includes and checks that they are processed succesfully.
>>
>> I am happy for the unit test to just use the internal help view.
>>
>> any ideas / starting points ?
Re: how can you write unit tests to see your dynamic content help has been processed [message #618960 is a reply to message #474125] Mon, 07 July 2008 10:20 Go to previous message
Quinn Dupont is currently offline Quinn Dupont
Messages: 3
Registered: January 2010
Junior Member
This is exactly the same funactionality that I need, however, I am not a
Java developer. Would you be willing to share (in detail, for a
non-developer) how this was accomplished?

Thanks,
Quinn

"Edoardo Comar" <ecomar@uk.ibm.com> wrote in message
news:g4t6pm$5i0$1@build.eclipse.org...
> Thanks, but for now
> I solved the problem by launching a workbench test that
> instead of parsing
> InputStream istream = HelpSystem.getHelpContent(href);
> which returns a fileinputstream without having processed the include
>
> goes through the webapp that serves the help pages
> URL helpUrl = BaseHelpSystem.resolve(href, false);
> and from the url -> inputstream -> sax input source ...
>
> does the test trick for me :-)
>
> Chris Goldthorpe wrote:
>> This ties in with an idea which I have been interested in which is to add
>> some infrastructure in the help system for verifying content. Currently
>> we have JUnit tests in org.eclipse.ua.tests which verify that each page
>> in a TOC can be loaded. The class which does this is
>> org.eclipse.ua.tests.help.toc.TocLinkChecker. It would be interesting to
>> extend this to add more checks for each page such as checking for missing
>> includes, images or broken interpage links. I don't have time to do this
>> in the near future but if you would be interested in contributing the
>> code to do the include checking I could give you pointers on how to go
>> about it.
>>
>> Edoardo Comar wrote:
>>> One of our help plugins contains a lot of <include>.
>>>
>>> Sometime the included documents (which are generated) have errors that
>>> prevent the include to work.
>>>
>>> I would like to write a junit test that launches all the help pages
>>> which have includes and checks that they are processed succesfully.
>>>
>>> I am happy for the unit test to just use the internal help view.
>>>
>>> any ideas / starting points ?
Re: how can you write unit tests to see your dynamic content help has been processed [message #618962 is a reply to message #474126] Mon, 07 July 2008 12:26 Go to previous message
Edoardo Comar is currently offline Edoardo Comar
Messages: 102
Registered: July 2009
Senior Member
Hi Quinn,
to use my approach you need to be able to write and run Eclipse Junit
tests.
There are plenty of learning resources on eclipse.org.



Quinn DuPont wrote:
> This is exactly the same funactionality that I need, however, I am not a
> Java developer. Would you be willing to share (in detail, for a
> non-developer) how this was accomplished?
>
> Thanks,
> Quinn
>
> "Edoardo Comar" <ecomar@uk.ibm.com> wrote in message
> news:g4t6pm$5i0$1@build.eclipse.org...
>> Thanks, but for now
>> I solved the problem by launching a workbench test that
>> instead of parsing
>> InputStream istream = HelpSystem.getHelpContent(href);
>> which returns a fileinputstream without having processed the include
>>
>> goes through the webapp that serves the help pages
>> URL helpUrl = BaseHelpSystem.resolve(href, false);
>> and from the url -> inputstream -> sax input source ...
>>
>> does the test trick for me :-)
>>
>> Chris Goldthorpe wrote:
>>> This ties in with an idea which I have been interested in which is to add
>>> some infrastructure in the help system for verifying content. Currently
>>> we have JUnit tests in org.eclipse.ua.tests which verify that each page
>>> in a TOC can be loaded. The class which does this is
>>> org.eclipse.ua.tests.help.toc.TocLinkChecker. It would be interesting to
>>> extend this to add more checks for each page such as checking for missing
>>> includes, images or broken interpage links. I don't have time to do this
>>> in the near future but if you would be interested in contributing the
>>> code to do the include checking I could give you pointers on how to go
>>> about it.
>>>
>>> Edoardo Comar wrote:
>>>> One of our help plugins contains a lot of <include>.
>>>>
>>>> Sometime the included documents (which are generated) have errors that
>>>> prevent the include to work.
>>>>
>>>> I would like to write a junit test that launches all the help pages
>>>> which have includes and checks that they are processed succesfully.
>>>>
>>>> I am happy for the unit test to just use the internal help view.
>>>>
>>>> any ideas / starting points ?
>
>
Previous Topic:Cheat Sheet
Next Topic:Command FrameWork- loosing popup menus when I detach window
Goto Forum:
  


Current Time: Thu Jul 31 03:40:46 EDT 2014

Powered by FUDForum. Page generated in 0.04666 seconds