Skip to main content

Export directory: overwrite or create new?

4 replies [Last post]
dtrounine
Offline
Joined: 2006-11-28

In test export mode user specifies the location where the exported content (html index, test bundles, sources, docs, etc) will be created (Let call it 'export directory').

After test export is complete, user can find what he wants in the export directory. He runs the exported tests, looks at sources and maybe he modifies the sources and rebuilds tests.

Then, user may wish to run the test suite in export mode once again. If he changes nothing in interview, the export directory this time is the same as previously. Naturally, the previous content is erased, just because it can conflict with newly exported content.

Now, the bad things happen: if user has changed something in the export directory between two test suite runs, these changes will be lost! So, it's non desirable to overwrite the previous exported content without warning.

Possible solution is to, each time the test suite has to be run in test export mode, ask user to specify new location of export directory. However there are use cases when creating new export directory each time is non desirable. If user runs his own HTTP server for provisioning of exported tests, he may wish to specify the root directory of his server as export directory, and use it for every test suite run.

Maybe this 'feature' should be configurable in some way, so that user could specify whether or not he wants to overwrite the previously exported content...

Please share your thoughts about this subject. I am going to fix this issue (Yeah, there is an issue about this: https://cqme.dev.java.net/issues/show_bug.cgi?id=38) and it would be great if we find the best solution!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vsizikov
Offline
Joined: 2004-11-16

Dmitri,

I've added my thoughts on thin to the Issue Tracker. It's easier that way, since the forum works, well, not very well...

Thanks,
--Vladimir

m_gorshenev
Offline
Joined: 2006-10-12

Hi Dmitri, all,

The test export feature is due for redesign. I may not make sense to invest a lot of effort into improving it as it stands right now.
You pointed out one of the usability problems, but there are ones which are more significant in my view.

The current approach where test export is considered a special kind of test run was implemented back in JavaTest 2 days and could be reworked to fit better with JavaTest 3.
Test export results are recorded in the same pass/fail format and may share the work dir with a regular test run.
The user can easily confuse (and accidentally mix) the results of a test run and test export and some tests will never be run.

From the usability standpoint it would make more sense to have test export implemented as a user action on a test rather than a test suite mode. E.g. (when exporting one or a few test cases ), the user right-clicks on the test(s) and selects "Export").
If an error happens, it may be more appropriate to display a pop-up window with an error message.

We still want to preserve the function in which many/all tests are exported, but it will be less likely to be used interactively (could be used in a batch mode etc).
This would reduce the risk of overwritten test export results.

thanks,
Misha

--------------------------------

> In test export mode user specifies the location where the exported content (html index, test bundles, sources, docs, etc) will be created (Let call it 'export directory').
>
> After test export is complete, user can find what he wants in the export directory. He runs the exported tests, looks at sources and maybe he modifies the sources and rebuilds tests.
>
> Then, user may wish to run the test suite in export mode once again. If he changes nothing in interview, the export directory this time is the same as previously. Naturally, the previous content is erased, just because it can conflict with newly exported content.
>
> Now, the bad things happen: if user has changed something in the export directory between two test suite runs, these changes will be lost! So, it's non desirable to overwrite the previous exported content without warning.
>
> Possible solution is to, each time the test suite has to be run in test export mode, ask user to specify new location of export directory. However there are use cases when creating new export directory each time is non desirable. If user runs his own HTTP server for provisioning of exported tests, he may wish to specify the root directory of his server as export directory, and use it for every test suite run.
>
> Maybe this 'feature' should be configurable in some way, so that user could specify whether or not he wants to overwrite the previously exported content...
>
> Please share your thoughts about this subject. I am going to fix this issue (Yeah, there is an issue about this: https://cqme.dev.java.net/issues/show_bug.cgi?id=38) and it would be great if we find the best solution!
> [Message sent by forum member 'dtrounine' (dtrounine)]
>
> http://forums.java.net/jive/thread.jspa?messageID=199832

vsizikov
Offline
Joined: 2004-11-16

Hi Misha,

> The test export feature is due for redesign.

Yes, that's what Dmitri is doing right now, and his first batch of updates has been committed to the repository a couple of days back.

And the Dmitri's question is related to that new update.

> The current approach where test export is considered
> a special kind of test run was implemented back in
> JavaTest 2 days and could be reworked to fit better
> with JavaTest 3.

I'm not sure that we can do much for JavaTest harness 3.x, but there is a possibility that newer version of JavaTest could provide some interesting capabilities.

> Test export results are recorded in the same
> pass/fail format and may share the work dir with a
> regular test run.

Yes, it's unclear how to avoid that...

> The user can easily confuse (and accidentally mix)
> the results of a test run and test export and some
> tests will never be run.

Yes, this is an issue with no clear resolution as of now.

But new Dmitri's test export code provides some other new improvements, like proper handling of security, export of jad files as well, an ability to rebuild the tests, etc, etc.

> From the usability standpoint it would make more
> sense to have test export implemented as a user
> action on a test rather than a test suite mode. E.g.
> (when exporting one or a few test cases ), the user
> right-clicks on the test(s) and selects "Export").

Yeah, as long as we have this capablity in the JavaTest, then we could consider further improvements. But we don't even know approximately when the new version of JavaTest will have the appropriate functionality.

> If an error happens, it may be more appropriate to
> display a pop-up window with an error message.

Agreed. But we also need to consider what can be done now (for the current test export functionality we already have) to minimize undesired consequences.

Thanks,
--Vladimir

m_gorshenev
Offline
Joined: 2006-10-12

Hi Vladimir,

> But we also need to consider what can be done now (for
> the current test export functionality we already have) to
> minimize undesired consequences.

Agreed. We do need to maintain the current functionality and fix any bugs we find.

thanks,
Misha