how can you write unit tests to see your dynamic content help has been processed [message #474116] |
Fri, 27 June 2008 11:13  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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 ?
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.25623 seconds