Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Entwicklung
    4. Integration Test läuft nicht an

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Integration Test läuft nicht an

    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      killroy2 last edited by

      Ich habe einen Adapter mit dem Template erstellt. Code für den Integration Test integrations.js überschreibe ich mit dem Beispiel aus
      https://github.com/ioBroker/testing
      Adapter startup (Integration test)

      Allerdings läuft der Test nicht richtig an, es kommt
      0 passing (0ms)

      Und die Stellen unten wo createErr stht werden offensichtlich nicht ausgeführt.

      const path = require("path");
      const { tests } = require("@iobroker/testing");
      
      // Run tests
      tests.integration(path.join(__dirname, ".."), {
          allowedExitCodes: [11],
          controllerVersion: "latest", // or a specific version like "4.0.1"
      
          // Define your own tests inside defineAdditionalTests
          defineAdditionalTests({ suite }) {
              suite("Test sendTo()", (getHarness) => {
                  // For convenience, get the current suite's harness before all tests
                  let harness;
                  before(() => {
                      harness = getHarness();
                      createErr;
                  });
      
                  it("Should work", () => {
                      return new Promise(async (resolve) => {
                          // Start the adapter and wait until it has started
                          createErr;
                          await harness.startAdapterAndWait();
      
                          // Perform the actual test:
                          harness.sendTo(".0", "test", "message", (resp) => {
                              createErr;
                              console.dir(resp);
                              resolve();
                          });
                      });
                  });
              });
      

      Was muss ich anpassen bzw gibts Beispiele für funktionierende Tests?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      Support us

      ioBroker
      Community Adapters
      Donate

      518
      Online

      31.7k
      Users

      79.8k
      Topics

      1.3m
      Posts

      1
      1
      136
      Loading More Posts
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      Community
      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
      The ioBroker Community 2014-2023
      logo