How can I view the contents of the local SQLite database?

Hi, Iā€™m currently working on lesson 5.2.3 - ā€œPreparing an Environment for Automationā€ of the intermediate certificate in test automation. I have created the docker-compose.yml file and have run the app as per instructions. Timesheet.db file is present both locally and in the docker, Iā€™m able to add a new project via the front end and the changes appear to be retained. However, Iā€™m struggling to open the timesheet.db file to review my changes as per step 4: " 1. Finally, we can open the local SQLite database in our project using a database manager (I like the SQLite extension for VSCode) and we can query the database to confirm that the local database has been updated." I tried using IntelliJ with the default DB browsing features as well as a plugin called SimpleSQLiteBrowser. In all cases, no tables are identified within the file so it seems like the issue might lie with the yaml file setup rather than the plugins?

I noticed that the contents of the yml file refer to c sharp version rather than the java Iā€™m using in line image: ā€œministryoftesting/support-app-c-sharp:latestā€ so I changed it to ā€œsupport-app-javaā€, also moved the line ā€˜appā€™ to the right as it was aligned left and did not seem to use the correct yml format. Still, no luck.

Could anyone please advise what might be the issue here or what am I doing wrong?

2 Likes

Hi @krisl

Iā€™ve looked into this and it appears somehow the content for the C# version of lesson 5.2.3 has been added to this lesson when it should have been Java version. Iā€™ve let @sarah1 know and the correct lesson will be put in place shortly. Apologies again and thank you for raising it.

3 Likes

Hi @krisl

That lesson has been updated now. Thanks for posting about the issue.

Iā€™m sorry that error slowed down your progress. Let us know if you have any more problems.

Best,

Sarah

2 Likes

Thank you both.

I followed the updated process, however I still donā€™t seem to be able to access the data in the db. Do I assume correctly that upon connection I should be able to view the tables created by the db.sql script? While technically it appears that I can open the connection to the h2 db, it contains no tables. However, data appears to be preserved, so it seems like there is a connection issue somewhere.

While the docker logs show that port 9090 is opened as expected, I believe that there could be an issue in the BaseBD class and tcp server creation?

Hi,

Can you share with me the connection details youā€™ve used as well as the tooling youā€™re using to connect to the DB.