Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create plugin that can replay operations #3990

Closed
ma2ciek opened this issue Feb 20, 2017 · 0 comments · Fixed by ckeditor/ckeditor5-engine#902
Closed

Create plugin that can replay operations #3990

ma2ciek opened this issue Feb 20, 2017 · 0 comments · Fixed by ckeditor/ckeditor5-engine#902
Assignees
Labels
package:engine type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Milestone

Comments

@ma2ciek
Copy link
Contributor

ma2ciek commented Feb 20, 2017

Edited
Few days ago @scofalik wrote a long text about engine complexity and debugging hell. He has already created a nice tool that enables logging a lot of useful informations to the console, but in many cases the amount of information is not enough to replay the bug. It's also hard to replay the bugs manually since they are complicated.

My proposal is to create a plugin for ckeditor5 that can filter and parse the logs and be able to replay logged operations on the initial state.

This plugin may expose following methods:

  • applyDeltas( numberOfDeltas ) - runs next n deltas, breaks when hits a bug.
  • applyNextDelta() - applies next delta. Warns if there're no deltas to replay.
  • applyAllDeltas() - applies all deltas, breaks when hit a bug.
  • play( timeout ) and stop() - plays deltas until the error occurs.

It could be used to write complex integration / regression tests as well.

This plugin doesn't require so much work:

  1. Improve logs, especially the logs from the insert operation.
  2. Write a plugin for debugging.
    1. Create a method that gets text from the history (?) property from the ckeditor5 initialisation object.
    2. Create a method that filters the logs and returns only operations.
    3. Create a method that parses operation logs and returns array of operation instances.
    4. Create methods that can inject operations into editor.

It covers https://github.com/ckeditor/ckeditor5-engine/issues/821.

WDYT?

@ma2ciek ma2ciek self-assigned this Apr 4, 2017
scofalik referenced this issue in ckeditor/ckeditor5-engine Apr 4, 2017
Feature: Introduced `dev-utils.DeltaReplayer`. Introduced new logging methods in `dev-utils.enableEngineDebug`. Closes #828.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added this to the iteration 9 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:engine labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:engine type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants