futsch1 / asn1editor Goto Github PK
View Code? Open in Web Editor NEWPython based editor for ASN.1 encoded data
License: MIT License
Python based editor for ASN.1 encoded data
License: MIT License
Launch the application with the arguments "-asn1spec example/example.asn -type EXAMPLE.Sequence"
Switch tool to Tree view
Step | Action | Expected | Status |
---|---|---|---|
1 | Select Sequence Set visibleString to "hello" Save data file Set visibleString to "goodbye" Load data file |
Visible string is restored to "hello" | Pass |
2 | Try to put more than 15 characters into visibleString | Not more than 15 characters can be entered | Pass |
3 | Hover the mouse over visibleString | Tooltip is displayed: "Minimum characters: 0, maximum characters: 15" | Pass |
4 | Set utf8String to "" (empty string) Save data file Set utf8String to "äöüØ" Save data file Set utf8String to "1" Load data file |
First save yields an error: "utf8String: Expected between 1 and 5 characters, but got 0." Second save is ok. After loading, utf8String is restored to "äöüØ" |
Pass |
5 | Disable "Hex" checkbox for octet string Set octet string to "ab" Save data file Set octet string to "ffff" Save data file Set octet string to "abcd" Load data file |
First save yields an error: "octetString: Expected between 4 and 4 characters, but got 2." Second save is ok. After loading, octetString is restored to "ffff" |
Pass |
6 | Set octet string to "abcd" Enable "Hex" checkbox for octet string Enter "64 63 62 61" Disable "Hex" checkbox for octet string Enable "Hex" checkbox for octet string Enter "uu" Disable "Hex" checkbox for octet string |
Enabling "Hex" checkbox shows "61 62 63 64" Disabling "Hex" checkbox shows "dcba" Enabling "Hex" checkbox shows "64 63 62 61" Disabling "Hex" checkbox shows "dcba" |
Fail |
When in Hex view, the maximum number of characters is incorrect. It is two times the string length, but should be three times the string length (two chars + space).
Launch the application with the arguments "example/example.asn -type EXAMPLE.Sequence"
Switch tool to Tree view
Step | Action | Expected | Status |
---|---|---|---|
1 | Select Sequence->example1, set member1 to 999 Save encoded data |
No error | Pass |
2 | Set member1 to 6000 Select Sequence->example2 Select Sequence->example1 Save encoded data Load encoded data |
After reselection, member1 is highlighted Saving fails with error: "example1: member1: Expected an integer between 0 and 5000, but got 6000." After loading, member1 has the value 999 |
Value is 999, but the highlighting is not reset |
3 | Hover over Sequence->example1 | Tooltip "Minimum:0, Maximum: 5000" is shown | Pending |
The title of the WxPython MainWindow should be passed via its constructor.
Step | Action | Expected | Status |
---|---|---|---|
1 | Open the application Open the example.asn specification, type "EXAMPLE.Sequence" Open File->Open recent |
example.asn, type "EXAMPLE.Sequence" is in the recent list | Pass |
2 | Close the application Open the application |
example.asn, type "EXAMPLE.Sequence" is in the recent list | Pass |
3 | Clear the recent list Close the application Open the application |
The recent list is empty | Fail |
When clearing the recent list, a deprecated warning appears:
C:\Users\Flo\Documents\Programmieren\asn1editor\asn1editor\wxPython\MenuHandler.py:172: wxPyDeprecationWarning: Call to deprecated item. Use Remove instead.
self.__recent_menu.RemoveItem(menu_item)
Add the possibility to close an opened specification
See summary
Step | Action | Expected | Status |
---|---|---|---|
1 | Start the application with the "-test" argument Open "Test->FileDialog" Select an existing file to open Select an existing file to save and overwrite |
An open file dialog is shown with the caption "Test open file" Selected file is shown in the tool's status bar A save file dialog is shown with the caption "Test save file" A popup is shown asking to overwrite the file Selected file is shown in the tool's status bar |
Pass |
2 | Open "Test 2->DirDialog" and select a directory Open "Test->DirDialog" and select a different directory with a different parent directory |
A directory select dialog is shown with the caption "Test 2" The selected directory is shown in the tool's status bar A directory select dialog is shown with the caption "Test" The selected directory is shown in the tool's status bar |
Fail |
When selecting a directory, the application crashes:
File "C:\Users\Flo\Documents\Programmieren\asn1editor\asn1editor\wxPython\FilePickerHandler.py", line 26, in on_menu_click
filenames = file_dialog.GetPaths()
AttributeError: 'DirDialog' object has no attribute 'GetPaths'
Launch the application with the arguments "example/example.asn -type EXAMPLE.Sequence"
Switch tool to Tree view
Step | Action | Expected | Status |
---|---|---|---|
1 | Select Sequence | Sequence members are displayed in content view (right side) Only "trivial" types (not sequence, choice, sequence of) are displayed |
Pass |
2 | Select example1 | Only members of sequence example1 are displayed in content view | Pass |
3 | Select optionalSequenceOf Enable optionalSequenceOf Increase elements to 2 Select both elements Decrease elements to 1 |
Correct number of elements are displayed at all times as children of optionalSequenceOf Members of elements are displayed in content view when selected |
Pass |
4 | Select choiceExample Select all possible values of choiceExample |
Child of choiceExample always reflects the choice selection Child contents always reflect child type |
Pass |
5 | Right click choiceExample Choose Collapse |
choiceExample node is collapsed, child is no longer visible in tree | Pass |
6 | Right click choiceExample Choose Expand |
Child is visible in tree | Pass |
7 | Right click sequence Choose Collapse all |
Only the root of tree is visible | Fail |
8 | Right click sequence Choose Expand all |
All tree items are visible | Fail |
When collapsing all, the root node is selected. However, in the content panel, the previous content is displayed. This should be reset to an empty panel.
See summary
Setting "Open last specification on startup" is disabled
Step | Action | Expected | Status |
---|---|---|---|
1 | Open the application Enable the setting "Open last specification on startup" Open the example.asn specification, type "EXAMPLE.Sequence" Close the application Open the application |
After reopen, the example.asn is opened with the type "EXAMPLE.Sequence" | Fail |
Not necessarily the most recent file is opened if this file is already in the "Recent" list. In this case, the uppermost entry of the "Recent" list is loaded.
Open example.asn, enable ...additionalOptional. Enter value 2. Load example.json.
Expected: ...additionalOptional is reset to default
Observed: value 2 stays
Launch the application without arguments, close potentially open specifications
Step | Action | Expected | Status |
---|---|---|---|
1 | Drag the file example/example.asn to the main window Select Sequence type |
Dialog box for selecting a type appears Specification is loaded |
Fail |
The dialog box appears, but in the wrong GUI state. The GUI is locked in that state and the drop cursor is still shown. The dialog box should appear after the file has been dropped and the event has benn processed.
Step | Action | Expected | Status |
---|---|---|---|
1 | Start the application with the "-test" argument Open "Test->FileDialog" Select an existing file to open Select an existing file to save and overwrite |
An open file dialog is shown with the caption "Test open file" Selected file is shown in the tool's status bar A save file dialog is shown with the caption "Test save file" A popup is shown asking to overwrite the file Selected file is shown in the tool's status bar |
Pass |
2 | Open "Test 2->DirDialog" and select a directory Open "Test->DirDialog" and select a different directory with a different parent directory |
A directory select dialog is shown with the caption "Test 2" The selected directory is shown in the tool's status bar A directory select dialog is shown with the caption "Test" The selected directory is shown in the tool's status bar |
Pass |
3 | Close the application Start the application with the "-test" argument Open "Test 2->DirDialog" and cancel Open "Test->DirDialog" and cancel |
Start directory of "Test 2" dialog is the same as in step 2 Start directory of "Test" dialog is the same as in step 2 |
Fail |
Directory in the opened dir dialog is one level further up than expected.
Setting "Open last specification on startup" is disabled
Step | Action | Expected | Status |
---|---|---|---|
1 | Open the application Enable the setting "Open last specification on startup" Open the example.asn specification, type "EXAMPLE.Sequence" Close the application Open the application |
After reopen, the example.asn is opened with the type "EXAMPLE.Sequence" | Pass |
2 | Open "tests/standards/rfc1157.asn", type RFC1157-SNMP.Message Close the application Open the application |
After reopen, "tests/standards/rfc1157.asn" with type RFC1157-SNMP.Message is opened | Pass |
3 | Close the specification Close the application Open the application |
After reopen, no specification is loaded | Fail |
4 | Open "tests/standards/rfc1157.asn", type RFC1157-SNMP.Message Disable the setting "Open last specification on startup" Close the application Open the application |
After reopen, no specification is loaded | Fail |
After reopening, the specification rfc1157.asn was loaded again.
If an asn.1 file contains additions to a sequence, these should be treated the same as optionals.
Launch the application with the arguments "example/example.asn -type EXAMPLE.Sequence"
Switch tool to Tree view
Step | Action | Expected | Status |
---|---|---|---|
1 | Select Sequence Set visibleString to "hello" Save encoded data Set visibleString to "goodbye" Load encoded data |
Visible string is restored to "hello" | Pass |
2 | Try to put more than 15 characters into visibleString | Not more than 15 characters can be entered | Pass |
3 | Hover the mouse over visibleString | Tooltip is displayed: "Minimum characters: 0, maximum characters: 15" | Pass |
4 | Set utf8String to "" (empty string) Save data file Set utf8String to "äöüØ" Save data file Set utf8String to "1" Load data file |
First save yields an error: "utf8String: Expected between 1 and 5 characters, but got 0." Second save is ok. After loading, utf8String is restored to "äöüØ" |
Pass |
5 | Disable "Hex" checkbox for octet string Set octet string to "ab" Save data file Set octet string to "ffff" Save data file Set octet string to "abcd" Load data file |
First save yields an error: "octetString: Expected between 4 and 4 characters, but got 2." Second save is ok. After loading, octetString is restored to "ffff" |
Fail |
6 | Set octet string to "abcd" Enable "Hex" checkbox for octet string Enter "64 63 62 61" Disable "Hex" checkbox for octet string Enable "Hex" checkbox for octet string Enter "uu" Disable "Hex" checkbox for octet string |
Enabling "Hex" checkbox shows "61 62 63 64" Disabling "Hex" checkbox shows "dcba" Enabling "Hex" checkbox shows "64 63 62 61" Disabling "Hex" checkbox shows "dcba" |
Fail |
Octet string length is only 1 after disabling hex checkbox
Fix handling of resource paths according to https://stackoverflow.com/questions/7674790/bundling-data-files-with-pyinstaller-onefile
Launch the application with the arguments "example/example.asn -type EXAMPLE.Sequence"
Switch tool to Tree view
Step | Action | Expected | Status |
---|---|---|---|
1 | Select Sequence | Sequence members are displayed in content view (right side) Only "trivial" types (not sequence, choice, sequence of) are displayed |
Pass |
2 | Select example1 | Only members of sequence example1 are displayed in content view | Pass |
3 | Select optionalSequenceOf Enable optionalSequenceOf Increase elements to 2 Select both elements Decrease elements to 1 |
Correct number of elements are displayed at all times as children of optionalSequenceOf Members of elements are displayed in content view when selected |
Pass |
4 | Select choiceExample Select all possible values of choiceExample |
Child of choiceExample always reflects the choice selection Child contents always reflect child type |
Pass |
5 | Right click choiceExample Choose Collapse |
choiceExample node is collapsed, child is no longer visible in tree | Fail |
6 | Right click choiceExample Choose Expand |
Child is visible in tree | Fail |
7 | Right click sequence Choose Collapse all |
Only the root of tree is visible | Fail |
8 | Right click sequence Choose Expand all |
All tree items are visible | Fail |
Right clicking an element does not change the content panel, but it should.
Plugins should be able to add or replace information in the "About" window.
File "C:\DATEN\Projects\OER_working_branch\src\euchnerDataFileTools\asn1editor\wxPython\FilePickerHandler.py", line 22, in on_menu_click
file_dialog.SetDirectory(initial_dir)
AttributeError: 'DirDialog' object has no attribute 'SetDirectory'
This would improve UX since the window sizes can be modified then.
Step | Action | Expected | Status |
---|---|---|---|
1 | Open the application Open the example.asn specification, type "EXAMPLE.Sequence" Open File->Open recent |
example.asn, type "EXAMPLE.Sequence" is in the recent list | Pass |
2 | Close the application Open the application |
example.asn, type "EXAMPLE.Sequence" is in the recent list | Pass |
3 | Clear the recent list Close the application Open the application |
The recent list is empty | Fail |
After reopening the application, no specification was opened although open last specification was checked and a specification was loaded while closing the application.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.