This repository contains testing artifacts for a React-based project with a Firebase backend, which can be found at Software Engineering Project. All the relevant testing files are included in the project's directory.
- Control Flow Graphs: Visual representations of the control flow in the application are available in the
Control Flow Graphs
folder. - Black Box Testing - EC: Documentation on Dry Black Box Testing and Equivalence Classes are located in the
Black Box testing- EC
folder. - Automated Testing: For automated testing assets, refer to the
src
,target
, andpom.xml
files within the repository. These are also bundled in thetesting.zip
archive for convenience.
Automated testing was performed using Selenium WebDriver and ChromeDriver. To install and run these tests, follow the steps outlined below:
-
Selenium Setup:
- Ensure Java and Maven are installed on your system.
- Install Selenium WebDriver from Selenium HQ.
- Download the correct version of ChromeDriver based on your Chrome version from ChromeDriver - WebDriver for Chrome.
-
Running Tests:
- Navigate to the root directory of the project.
- Execute
mvn test
to run the automated tests.
To connect the project to your Firebase instance, you need to set up Firebase and configure the project with your credentials.
-
Create a Firebase Web App:
- Visit the Firebase Console.
- Add a new project and navigate to the 'Web app' configuration.
- Set up Firestore as the database and Firebase Storage.
-
Configure Firebase in the Project:
- Navigate to
Project/src/firebase/firebase.js
. - Replace the placeholders in the
firebaseConfig
object with your Firebase configuration keys.
- Navigate to
import { initializeApp } from "firebase/app";
import { getAuth } from "firebase/auth";
import { getStorage } from "firebase/storage";
import { getFirestore } from "firebase/firestore";
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_AUTH_DOMAIN",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_STORAGE_BUCKET",
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
appId: "YOUR_APP_ID",
measurementId: "YOUR_MEASUREMENT_ID"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const auth = getAuth(app);
const storage = getStorage(app);
const db = getFirestore(app);
export { db, auth, app, storage };
Manually populate the Firestore database with initial data entries since the system does not include a sign-up function. Set up the document paths and other required configurations as per your project's data schema. Make sure to keep your Firebase credentials confidential and do not expose them in public repositories. Adjust the Firebase rules according to the needs of your testing scenarios.
Happy testing!