Giter Site home page Giter Site logo

saleha-muzammil / software-testing-selenium Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 2.82 MB

Software Testing of a site created in React with a Firebase backend. Testing done using Selenium and other approaches.

Java 39.39% HTML 0.93% CSS 9.55% JavaScript 50.13%

software-testing-selenium's Introduction

Software Testing for React Application with Firebase Backend

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.

Contents

  • 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, and pom.xml files within the repository. These are also bundled in the testing.zip archive for convenience.

Setup for Automated Testing

Automated testing was performed using Selenium WebDriver and ChromeDriver. To install and run these tests, follow the steps outlined below:

  1. Selenium Setup:

  2. Running Tests:

    • Navigate to the root directory of the project.
    • Execute mvn test to run the automated tests.

Firebase Configuration

To connect the project to your Firebase instance, you need to set up Firebase and configure the project with your credentials.

  1. 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.
  2. Configure Firebase in the Project:

    • Navigate to Project/src/firebase/firebase.js.
    • Replace the placeholders in the firebaseConfig object with your Firebase configuration keys.
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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.