Skip to content

Testing Protocol

Kevin edited this page Mar 14, 2020 · 21 revisions

Table of Contents

Automated Testing Protocol
Manual Testing Protocol

Automated Testing Protocol

Before running any unit tests, you must first install the dependencies. These instructions assume you already have Node.js installed.

  1. Navigate to the GRNsight directory
$ cd ~/GRNsight 
  1. Ensure that all required libraries are installed.

  2. Run the unit tests with Mocha

$ make test 

*All written unit tests can be seen in GRNsight/test. These tests are organized so that all unit test functions have been consolidated in test.js, and all test calls are made in separate files according to the category in which the test file resides in the test-files folder.

Manual Testing Protocol

All testing should be done on the beta page of the website.

  1. Upload an xlsx input file. It should display correctly, with black lines.
  2. Move the Link Distance slider to the maximum. It should display "500" and the lines between the nodes should become very long.
  3. Click "Reset Sliders". Link Distance should go back to 200.
  4. Move the Charge slider to the maximum. It should display "0", and the nodes should cluster close together in the center.
  5. Click "Reset Sliders". Charge should go back to -500.
  6. Move the Charge Distance to the minimum. It should display "0" and the nodes should cluster close together in the center.
  7. Click "Reset Sliders". Charge Distance should go back to 1000.
  8. Move the Gravity Slider to the maximum. It should display "1" and the nodes should cluster close together in the center.
  9. Click "Reset Sliders". Gravity should go back to 0.1.
  10. Check the "Lock Force Graph Parameters" checkbox. Attempt to move each of the sliders. It should not allow you to.
  11. Drag around several of the nodes. They should lock in place upon letting go of them.
  12. Uncheck the "Lock Force Graph Parameters" checkbox. Move the Link Distance, Charge, and Gravity sliders to maximum, and the Charge Distance slider to minimum. Ensure that the locked nodes do not move with the changing sliders.
  13. Double-click one of the locked nodes. It should become affected by the sliders.
  14. Reload the page. Ensure that the sliders return to their default positions with their default values.
  15. Upload an xlsx output file. It should display correctly, with colored and weighted lines.
  16. Repeat steps 2-13 with the output file.
  17. Hover over one of the lines. It should display the value in a tooltip.
  18. Submit 10 different data files (input and output) without reloading the page. Each should display properly without error if they are taken from /test-files/data-samples.
  19. Reload the page. Load a weighted GRN. It should appear with colored lines and both arrowheads and repressor bars.
  20. Go to Edit > Preferences and select "Default to black edges with regular arrowheads". Ensure that a check appears next to this option.
  21. Reload the weighted GRN via the File > Reload button. The GRN should load with black lines and regular arrowheads.
  22. Load an unweighted GRN. It should appear as normal.
  23. Go to Edit > Preferences and select "Format edges based on optimized weight parameters". Ensure that a check appears next to this option.
  24. Reload the unweighted GRN. Its appearance should be as it was before.
  25. Load a weighted GRN. It should appear with colored lines and both arrowheads and repressor bars.
  26. Upload test-files/graph-tests/all-positive-weights.xlsx. It should appear with magenta, pointy arrow edges in all 14 edge widths.
  27. Upload test-files/graph-tests/all-negative-weights.xlsx. It should appear with cyan, repressor bar edges in all 14 edge widths.

GRNsight State Diagram for the Locking, Unlocking, and Resetting of Nodes

Test Files and Expected Outcomes:

Folder Name File Name Content Characteristics
adjacency-matrix-modifications asymmetric-gene-order-input.xlsx Copy and pasted (transposed) the target genes to source genes in the network sheet only. Switched the position of several source genes in the network sheet only.
adjacency-matrix-modifications asymmetric-gene-order-output.xlsx Copy and pasted (transposed) the target genes to source genes in both sheets. Switched the position of several source genes in both sheets.
adjacency-matrix-modifications empty-column-input.xlsx Deleted all data in column G in the network sheet.
adjacency-matrix-modifications empty-column-output.xlsx Deleted all data in column G in both sheets.
adjacency-matrix-modifications empty-row-input.xlsx Deleted all data in row in the network sheet.
adjacency-matrix-modifications empty-row-output.xlsx Deleted all data in row in both sheets.
adjacency-matrix-modifications extra-data-random-cell-both-output.xlsx 0 in R31 (outside of the matrix) in both sheets.
adjacency-matrix-modifications extra-data-random-cell-network-only-input.xlsx 0 in R31 (outside of the matrix) in network sheet only.
adjacency-matrix-modifications extra-data-random-cell-network-only-output.xlsx 0 in R31 and L29 (outside of the matrix) in network sheet only.
adjacency-matrix-modifications extra-data-random-cell-network-optimized-only-output.xlsx 0 in Q31 (outside of the matrix) in network optimized weights sheet only.
adjacency-matrix-modifications missing-value-both-sheets-output.xlsx Missing value in C4 in both sheets.
adjacency-matrix-modifications missing-value-network-only-input.xlsx Missing value in C4 in network sheet only.
adjacency-matrix-modifications missing-value-network-only-output.xlsx Missing value in C4 in network sheet only.
adjacency-matrix-modifications missing-value-network-optimized-only-output.xlsx Missing value in C4 in network optimized weights sheet only.
adjacency-matrix-modifications text-data-type-inside_related-both-output.xlsx Changed data type in B7 from General to Text in both sheets.
adjacency-matrix-modifications text-data-type-inside_related-net-only-input.xlsx Changed data type in B7 from General to Text in network sheet only.
adjacency-matrix-modifications text-data-type-inside_related-net-only-output.xlsx Changed data type in B7 from General to Text in network sheet only.
adjacency-matrix-modifications text-data-type-inside_related-net-op-only-output.xlsx Changed data type in B7 from General to Text in network optimized weights sheet only.
adjacency-matrix-modifications text-data-type-inside-unrelated-both-output.xlsx Changed data type in B2 (contains 0) from General to Text in both sheets.
adjacency-matrix-modifications text-data-type-inside-unrelated-net-only-input.xlsx Changed data type in B2 (contains 0) from General to Text in network sheet only.
adjacency-matrix-modifications text-data-type-inside-unrelated-net-only-output.xlsx Changed data type in B2 (contains 0) from General to Text in network sheet only.
adjacency-matrix-modifications text-data-type-inside-unrelated-net-op-only-output.xlsx Changed data type in B2 (contains 0) from General to Text in network optimized weights sheet only.
adjacency-matrix-modifications text-data-type-outside-both-output.xlsx Changed data type in D25 (outside of matrix, contains no data) from General to Text in both sheets.
adjacency-matrix-modifications text-data-type-outside-net-only-input.xlsx Changed data type in D25 (outside of matrix, contains no data) from General to Text in network sheet only.
adjacency-matrix-modifications text-data-type-outside-net-only-output.xlsx Changed data type in D25 (outside of matrix, contains no data) from General to Text in network sheet only.
adjacency-matrix-modifications text-data-type-outside-net-op-only-output.xlsx Changed data type in D25 (outside of matrix, contains no data) from General to Text in network optimized weights sheet only.
adjacency-matrix-modifications value-replaced-w-spaces-both-output.xlsx Replaced the value in C4 with space characters in both sheets.
adjacency-matrix-modifications value-replaced-w-spaces-net-op-only-output.xlsx Replaced the value in C4 with spaces in network optimized weights sheet only.
adjacency-matrix-modifications value-replaced-w-spaces-net-only-input.xlsx Replaced the value in C4 with spaces in the network sheet only.
adjacency-matrix-modifications value-replaced-w-spaces-net-only-output.xlsx Replaced the value in C4 with spaces in the network sheet only.
gene-name-modifications duplicate-gene-side-and-top-input.xlsx Created a duplicate row and a duplicate column of ACE2 in the network sheet. The duplicate gene is adjacent to the original in both the column and the row.
gene-name-modifications duplicate-gene-side-and-top-nonadjacent-input.xlsx Created a duplicate row and a duplicate column of ACE2 in the network sheet. The duplicate gene is several genes away from the original in both the row and column.
gene-name-modifications duplicate-gene-side-and-top-output.xlsx Created a duplicate row and duplicate column of ACE2 in both sheets. The duplicate gene is adjacent to the original.
gene-name-modifications duplicate-gene-side-and-top-nonadjacent-output.xlsx Created a duplicate row and a duplicate colun of ACE2 in both sheets. The duplicate row is several genes away from the original.
gene-name-modifications duplicate-gene-side-input.xlsx Created a duplicate row of ACE2 in the network sheet. The duplicate gene is adjacent to the original.
gene-name-modifications duplicate-gene-side-nonadjacent-input.xlsx Created a duplicate row of ACE2 in the network sheet. The duplicate gene is several genes away from the original.
gene-name-modifications duplicate-gene-side-output.xlsx Created a duplicate row of ACE2 in both sheets. The duplicate gene is adjacent to the original.
gene-name-modifications duplicate-gene-side-nonadjacent-output.xlsx Created a duplicate row of ACE2 in both sheets. The duplicate row is several genes away from the original.
gene-name-modifications duplicate-gene-top-input.xlsx Created a duplicate column of ACE2 in the network sheet. The duplicate gene is adjacent to the original.
gene-name-modifications duplicate gene-top-nonadjacent-input.xlsx Created a duplicate column of ACE2 in both sheets. The duplicate column is several genes away from the original.
gene-name-modifications duplicate-gene-top-output.xlsx Created a duplicate column of ACE2 in both sheets. The duplicate column is adjacent to the original.
gene-name-modifications duplicate-gene-top-nonadjacent-output.xlsx Created a duplicate column of ACE2 in both sheets. The duplicate row is several genes away from the original.
gene-name-modifications long-gene-name-input.xlsx Changed ACE2 to ACE2QWERTYUIO in both the row and column of the network sheet.
gene-name-modifications long-gene-name-output.xlsx Changed ACE2 to ACE2QWERTYUIO in both the row and column of both sheets.
gene-name-modifications mismatched-case-related-input.xlsx In the column of the network sheet only, the gene is named 'ace2' but in the row, the gene is named 'ACE2'.
gene-name-modifications mismatched-case-related-output.xlsx In the column of both sheets, the gene is named 'ace2', but in the row, the gene is named 'ACE2'.
gene-name-modifications mismatched-case-unrelated-input.xlsx In the column of the network sheet only, the gene is named 'abf1', but in the row, the gene is named 'ABF1'.
gene-name-modifications mismatched-case-unrelated-output.xlsx In the column of both sheets, the gene is named 'abf1', but in the row, the gene is named 'ABF1'.
gene-name-modifications missing-gene-name-side-input.xlsx Removed ACE2 from row on network sheet only.
gene-name-modifications missing-gene-name-side-output.xlsx Removed ACE2 from row on both sheets.
gene-name-modifications missing-gene-name-top-and-side-input.xlsx Removed ACE2 from row and column on network sheet only.
gene-name-modifications missing-gene-name-top-and-side-output.xlsx Removed ACE2 from row and column on both sheets.
gene-name-modifications missing-gene-name-top-input.xlsx Removed ACE2 from column of network sheet only.
gene-name-modifications missing-gene-name-top-output.xlsx Removed ACE2 from column of both sheets.
gene-name-modifications/special-character-tests *-related-input.xlsx Added indicated special character to the end of ACE2 on both the row and column of the network sheet.
gene-name-modifications/special-character-tests *-related-output.xlsx Added indicated special character tothe end of ACE2 on both the row and column of both sheets.
gene-name-modifications/special-character-tests *-unrelated-input.xlsx Added indicated special character to the end of ABF1 on both the row and column of the network sheet only.
gene-name-modifications/special-character-tests *-unrelated-output.xlsx Added indicated special character to the end of ABF1 on both the row and column of both sheets.
graph-tests asymmetrical-disordered-input.xlsx Different genes are in different orders in the rows and columns in the network sheet only.
graph-tests asymmetrical-more-source-genes.xlsx Different genes are in different orders in the rows and columns, and there is an extra source (column) gene.
graph-tests asymmetrical-more-target-genes.xlsx Different genes are in different orders in the rows and columns, and there is an extra target (row) gene.
graph-tests check-self-referential-width.xlsx Created self-referential arrows between all of the genes with varying weights.
graph-tests dCIN5GendronModel1.xlsx User created file with extraneous NaN and undefined data.
graph-tests test-range-edge-sizes.xlsx Created edges between different genes of varying weights.
graph-tests/different-sized-networks -genes--edges.xlsx Created sheets with varying numbers of genes and edges to check upload time of large sheets and test for network size warning and error messages.
sheet-modifications extra-sheet-input.xlsx Added an extra sheet named "Extra Sheet" with a couple fragments of text across several cells.
sheet-modifications extra-sheet-output.xlsx Added and extra sheet named "Extra Sheet" with a couple fragments of text.
sheet-modifications missing-sheet-input.xlsx Deleted an unnecessary sheet for creating the graph from the workbook.
sheet-modifications missing-sheet-output.xlsx Deleted the network_optimized_weights sheet from the workbook.
sheet-modifications sheet-names-switched-output.xlsx Switched network and network_optimized_weights sheet names.
sheet-modifications wrong-sheet-name-input.xlsx Recreated the matrix originally in the network sheet in another sheet named "Wrong Sheet Name".
sheet-modifications wrong-sheet-name-output.xlsx Recreated the matrix originally in network optimized weights sheet in another sheet named "Wrong Sheet Name".
sheet-modifications/cell-A1-modifications *-a1-input.xlsx Inserted the indicated special character/gene into the A1 cell in the network sheet.
sheet-modifications/cell-A1-modifications *-a1-output.xlsx Inserted the indicated special character/gene to the A1 cell in both sheets.
wrong-file-type wrong-file-type1.pdf A random pdf file.
wrong-file-type wrong-file-type2.pnd A random png file.
Clone this wiki locally