Compare the results of JCR queries between AEM instances.
  1. Go to CRXDe http://host:port/crx/de/index.jsp in a lower environment and go to Tools => Query to test an XPath query that searches for the content you want to compare.
  2. Once you have formulated a proper XPath query then use curl to run the query against each of the environments you want to compare the data for.
    For example:
    curl -u admin:adminPassword 'http://host:port/crx/de/query.jsp?_charset_=utf-8&type=xpath&showResults=true&stmt=/jcr:root/content/we-retail//element(*, cq:Page)' > server1.json
    Example query to get all page under geometrixx en (note you may have to use url encoding):
    curl -u admin:admin 'http://localhost:4502/crx/de/query.jsp?_charset_=utf-8&type=xpath&showResults=true&stmt=%2Fjcr%3Aroot%2Fcontent%2Fgeometrixx%2Fen%2F%2Felement(*%2C%20cq%3APage)' > server1.json
  3. Copy the contents of the json output files to the textareas on this page for comparison.
  4. Paths that exist in actual but not in Expected Paths are displayed in Aqua. Paths that exist in expected but not in Actual Paths are displayed in light red.
  5. Swap the contents of the text areas by clicking Swap. Clear them by clicking Clear.
  6. After comparing the data, filter it using the select box.
Inputs (Expected paths json (EP) / Actual paths json (AP))
Results of comparision
Path List Exist in EP Exist in AP